| 1 |
<?php |
| 2 |
|
| 3 |
use PHPUnit\Framework\TestCase; |
| 4 |
|
| 5 |
class FontIconPageListTest extends TestCase { |
| 6 |
|
| 7 |
public function setUp() { |
| 8 |
$this->form_component = new ResponsiveMenu\Form\FontIconPageList; |
| 9 |
} |
| 10 |
|
| 11 |
public function testRendering() { |
| 12 |
$output = $this->form_component->render(new ResponsiveMenu\Models\Option('a', '{"id":["1", "2"],"icon":["a", "b"]}')); |
| 13 |
$this->assertContains("class='a_icon'", $output); |
| 14 |
$this->assertContains("value='2'", $output); |
| 15 |
$this->assertContains("value='b'", $output); |
| 16 |
} |
| 17 |
|
| 18 |
public function testRenderingWhenEmpty() { |
| 19 |
$output = $this->form_component->render(new ResponsiveMenu\Models\Option('a', 'b')); |
| 20 |
$this->assertContains("class='a_icon'", $output); |
| 21 |
} |
| 22 |
|
| 23 |
} |
| 24 |
|