# responsive-menu/3.0.12/tests/app/ViewModels/Components/Admin/BoxesTest.php

Responsive Menu – Create Mobile-Friendly Menu, version 3.0.12. 51 lines.

- Page: https://pluginprobe.com/plugins/responsive-menu/3.0.12/code/tests/app/ViewModels/Components/Admin/BoxesTest.php
- Raw: https://pluginprobe.com/plugins/responsive-menu/3.0.12/raw/tests/app/ViewModels/Components/Admin/BoxesTest.php
- Modified: 2016-08-20T23:47:42+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/responsive-menu/3.0.12/code/tests/app/ViewModels/Components/Admin/BoxesTest.php#L10-L20`.

```php
<?php

namespace ResponsiveMenu\ViewModels\Components\Admin;

use PHPUnit\Framework\TestCase;
use ResponsiveMenu\Models\Option;
use ResponsiveMenu\Collections\OptionsCollection;

class BoxesTest extends TestCase {

  public function setUp() {
    $this->collection = new OptionsCollection;
    $this->collection->add(new Option('a_three', 'a value'));
    $this->collection->add(new Option('b_three', 'b value'));

    $this->component = new Boxes(
    [
      'a one' => [
        'a two' => [
          [
            'type' => 'text',
            'option' => 'a_three',
            'title' => 'a three title',
            'label' => 'a three label',
          ]
        ]
      ],
      'b one' => [
        'b two' => [
          [
            'type' => 'colour',
            'option' => 'b_three',
            'title' => 'b three title',
            'label' => 'b three label',
          ]
        ]
      ]
    ], $this->collection);
  }

  public function testRender() {

    $rendered = $this->component->render();
    $this->assertContains('tab_container_a_one"', $rendered);
    $this->assertContains('id="b_three_container"', $rendered);
    $this->assertContains('<div class="label">a three title</div>', $rendered);
    $this->assertContains('<div class="label">b three title</div>', $rendered);
  }

}

```
