createInstance() public static method

public static createInstance ( RouteRule $routeRule )
$routeRule Ouzo\Routing\RouteRule
Example #1
0
 /**
  * @test
  */
 public function shouldNotStoreEmptyUrlForNotices()
 {
     //given
     Config::overridePropertyArray(array('global', 'prefix_system'), 'prefix');
     $_SESSION = array();
     $controller = Controller::createInstance(new RouteRule('', '', '', '', false));
     //when
     $controller->notice('hello');
     //then
     Assert::thatArray(Session::get('messages'))->containsOnly(new Notice('hello', null));
     Config::revertPropertyArray(array('global', 'prefix_system'));
 }