/**
  * 
  */
 public function testNoPath()
 {
     $input = './../../../../../../../../../etc/passwd';
     $expect = 'passwd';
     $this->assertSame($expect, Inspekt::noPath($input));
 }
Exemple #2
0
 /**
  * Returns basename(value).
  *
  * @param mixed $key
  * @return mixed
  *
  * @tag filter
  */
 function noPath($key)
 {
     if (!$this->keyExists($key)) {
         return false;
     }
     return Inspekt::noPath($this->_getValue($key));
 }
Exemple #3
0
 /**
  * Returns basename(value).
  *
  * @param mixed $key
  * @return mixed
  * @throws Exception
  * @tag filter
  */
 public function noPath($key)
 {
     return Inspekt::noPath($this->getValue($key));
 }