| 1 |
<?php |
| 2 |
|
| 3 |
use PHPUnit\Framework\TestCase; |
| 4 |
|
| 5 |
class MenuOrderingTest extends TestCase { |
| 6 |
|
| 7 |
public function setUp() { |
| 8 |
$this->form_component = new ResponsiveMenu\Form\MenuOrdering; |
| 9 |
} |
| 10 |
|
| 11 |
public function testRendering() { |
| 12 |
$output = $this->form_component->render(new ResponsiveMenu\Models\Option('a', '{"search": "on", "title": "off"}')); |
| 13 |
$this->assertContains('menu-order-option-switch menu-order-option-switch-on', $output); |
| 14 |
$this->assertContains('value="off" name="menu[a][title]"', $output); |
| 15 |
$this->assertContains('value="on" name="menu[a][search]"', $output); |
| 16 |
} |
| 17 |
} |
| 18 |
|