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 / Admin / BoxesTest.php

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

51 lines 1.3 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\Admin;
4
5 use PHPUnit\Framework\TestCase;
6 use ResponsiveMenu\Models\Option;
7 use ResponsiveMenu\Collections\OptionsCollection;
8
9 class BoxesTest extends TestCase {
10
11 public function setUp() {
12 $this->collection = new OptionsCollection;
13 $this->collection->add(new Option('a_three', 'a value'));
14 $this->collection->add(new Option('b_three', 'b value'));
15
16 $this->component = new Boxes(
17 [
18 'a one' => [
19 'a two' => [
20 [
21 'type' => 'text',
22 'option' => 'a_three',
23 'title' => 'a three title',
24 'label' => 'a three label',
25 ]
26 ]
27 ],
28 'b one' => [
29 'b two' => [
30 [
31 'type' => 'colour',
32 'option' => 'b_three',
33 'title' => 'b three title',
34 'label' => 'b three label',
35 ]
36 ]
37 ]
38 ], $this->collection);
39 }
40
41 public function testRender() {
42
43 $rendered = $this->component->render();
44 $this->assertContains('tab_container_a_one"', $rendered);
45 $this->assertContains('id="b_three_container"', $rendered);
46 $this->assertContains('<div class="label">a three title</div>', $rendered);
47 $this->assertContains('<div class="label">b three title</div>', $rendered);
48 }
49
50 }
51