| 1 |
<?php |
| 2 |
|
| 3 |
use PHPUnit\Framework\TestCase; |
| 4 |
|
| 5 |
class ImageTest extends TestCase { |
| 6 |
|
| 7 |
public function setUp() { |
| 8 |
$this->form_component = new ResponsiveMenu\Form\Image; |
| 9 |
} |
| 10 |
|
| 11 |
public function testRendering() { |
| 12 |
$output = $this->form_component->render(new ResponsiveMenu\Models\Option('a', 1)); |
| 13 |
$this->assertEquals("<input type='text' class='image' id='a' name='menu[a]' value='1' />" |
| 14 |
. "<button type='button' class='button image_button' for='a' /><i class='fa fa-upload'></i></button>", $output); |
| 15 |
} |
| 16 |
|
| 17 |
} |
| 18 |
|