| 1 |
<?php |
| 2 |
|
| 3 |
namespace ResponsiveMenu\ViewModels\Components\Menu; |
| 4 |
|
| 5 |
use PHPUnit\Framework\TestCase; |
| 6 |
use ResponsiveMenu\Collections\OptionsCollection; |
| 7 |
|
| 8 |
class SearchTest extends TestCase { |
| 9 |
|
| 10 |
public function setUp() { |
| 11 |
$this->translator = $this->createMock('ResponsiveMenu\Translation\Translator'); |
| 12 |
$this->component = new Search($this->translator); |
| 13 |
} |
| 14 |
|
| 15 |
public function testRender() { |
| 16 |
$collection = new OptionsCollection; |
| 17 |
$this->translator->method('searchUrl')->willReturn('a'); |
| 18 |
$this->assertContains('action="a" ', $this->component->render($collection)); |
| 19 |
} |
| 20 |
|
| 21 |
} |
| 22 |
|