public function testItRegisterClassAliasWithForDefault()
 {
     $this->assertFalse(class_exists('A'));
     ArrayPath::registerClassAlias();
     $this->assertTrue(class_exists('A'));
     $a = array('a' => array('b' => array('c' => null)));
     $this->assertFalse(ArrayPath::exists($a, 'a/b/c/d'));
     $this->assertTrue(ArrayPath::exists($a, 'a/b/c'));
 }
Beispiel #2
0
 /**
  * Check if the actual value matches the expected.
  * Actual passed by reference to preserve reference trail (where applicable)
  * back to the original method parameter.
  *
  * @param mixed $actual
  * @return bool
  */
 public function match(&$actual)
 {
     return A::exists($actual, $this->path) && A::get($actual, $this->path) == $this->_expected;
 }