Hoa central
Kit.php
Go to the documentation of this file.
1 <?php
2 
37 namespace Hoa\Dispatcher\Test\Unit;
38 
39 use Hoa\Dispatcher as LUT;
40 use Hoa\Test;
41 
50 class Kit extends Test\Unit\Suite
51 {
52  public function case_construct()
53  {
54  $this
55  ->given(
56  $router = new \Mock\Hoa\Router(),
57  $dispatcher = new \Mock\Hoa\Dispatcher(),
58  $view = new \Mock\Hoa\View\Viewable()
59  )
60  ->when($result = new LUT\Kit($router, $dispatcher, $view))
61  ->then
62  ->object($result->router)
63  ->isIdenticalTo($router)
64  ->object($result->dispatcher)
65  ->isIdenticalTo($dispatcher)
66  ->object($result->view)
67  ->isIdenticalTo($view)
68  ->variable($result->data)
69  ->isNull();
70  }
71 
72  public function case_construct_no_view()
73  {
74  $this
75  ->given(
76  $router = new \Mock\Hoa\Router(),
77  $dispatcher = new \Mock\Hoa\Dispatcher()
78  )
79  ->when($result = new LUT\Kit($router, $dispatcher))
80  ->then
81  ->object($result->router)
82  ->isIdenticalTo($router)
83  ->object($result->dispatcher)
84  ->isIdenticalTo($dispatcher)
85  ->variable($result->view)
86  ->isNull()
87  ->variable($result->data)
88  ->isNull();
89  }
90 }
$dispatcher
Definition: Hoa.php:98