PluginProbe
Responsive Menu – Create Mobile-Friendly Menu / 3.0.12
Responsive Menu – Create Mobile-Friendly Menu v3.0.12
4.7.3 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.10 4.1.11 4.1.12 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2.0 All 90 releases
responsive-menu / tests / app / ViewModels / Components / Menu / MenuTest.php

MenuTest.php in Responsive Menu – Create Mobile-Friendly Menu 3.0.12, at tests/app/ViewModels/Components/Menu/MenuTest.php

37 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace ResponsiveMenu\ViewModels\Components\Menu;
4 use PHPUnit\Framework\TestCase;
5 use ResponsiveMenu\Models\Option;
6
7 class MenuTest extends TestCase {
8
9 public function setUp() {
10
11 function wp_nav_menu($args) {
12 return $args;
13 }
14
15 $this->translator = $this->createMock('ResponsiveMenu\Translation\Translator');
16 $this->component = new Menu($this->translator);
17 }
18
19 public function testRender() {
20 $collection = new \ResponsiveMenu\Collections\OptionsCollection;
21 $collection->add(new Option('menu_to_use', 'b'));
22 $collection->add(new Option('theme_location_menu', 'b'));
23 $collection->add(new Option('menu_depth', 'b'));
24 $collection->add(new Option('custom_walker', '\StdClass'));
25 $this->translator->method('translate')->willReturn('b');
26 $args = $this->component->render($collection);
27 $this->assertEquals('', $args['container']);
28 $this->assertEquals('responsive-menu', $args['menu_id']);
29 $this->assertNull($args['menu_class']);
30 $this->assertNull($args['menu']);
31 $this->assertEquals('b', $args['depth']);
32 $this->assertEquals('b', $args['theme_location']);
33 $this->assertFalse($args['echo']);
34 }
35
36 }
37