Esempio n. 1
0
 public function testReturnCorrectValueWhenNotInitiated()
 {
     $active = new Active(null);
     $this->assertFalse($active->checkAction([]));
     $this->assertFalse($active->checkRouteParam('', ''));
     $this->assertFalse($active->checkRoute([]));
     $this->assertFalse($active->checkRoutePattern([]));
     $this->assertFalse($active->checkUriPattern([]));
     $this->assertFalse($active->checkUri([]));
     $this->assertFalse($active->checkQuery('', ''));
     $this->assertFalse($active->checkController([]));
     $this->assertSame('', $active->getAction());
     $this->assertSame('', $active->getController());
     $this->assertSame('', $active->getMethod());
 }
Esempio n. 2
0
 /**
  * Check if the parameter of the current route has the correct value
  *
  * @param $param
  * @param $value
  * @return bool 
  * @static 
  */
 public static function checkRouteParam($param, $value)
 {
     return \HieuLe\Active\Active::checkRouteParam($param, $value);
 }