/**
  * @param array  $input
  * @param string $expectedResult
  *
  * @dataProvider provideDateForGenerateFromInput
  */
 public function testGenerateFromInputWithHtmlRenderer(array $input, $expectedResult)
 {
     $menuGenerator = new MenuGenerator(new HtmlRenderer());
     $result = $menuGenerator->generateFromInput($input);
     static::assertEquals($expectedResult, $result);
 }
예제 #2
0
<?php

/**
 * User: Roman Galeev <*****@*****.**>
 * Date: 23/10/15
 * Time: 21:58
 */
use Menu\InputGenerator;
use Menu\MenuGenerator;
use Menu\HtmlRenderer;
require_once 'autoloader.php';
$inputGenerator = new InputGenerator();
$input = $inputGenerator->generate();
$menuGenerator = new MenuGenerator(new HtmlRenderer());
$menu = $menuGenerator->generateFromInput($input);
\var_export($menu);