Exemple #1
0
 /** @test */
 public function it_renders_test_items_with_its_template()
 {
     $attributes = array('url' => 'TEST_URL', 'label' => 'TEST_LABEL', 'attributes' => array('class' => 'TEST_CLASS'));
     $items = $this->factory->times(2)->menuItem($attributes);
     $menu = new Menu('test', $items, ':url :label :attributes<br />');
     $html = $menu->render();
     $expectedHtml = "TEST_URL TEST_LABEL class=\"TEST_CLASS\"<br />\nTEST_URL TEST_LABEL class=\"TEST_CLASS\"<br />";
     $this->assertContains($expectedHtml, $html);
 }
 public function save(Menu $menu)
 {
     $this->menus[$menu->getName()] = $menu;
 }