Coduo\PHPMatcher\Tests\Matcher\JsonMatcherTest::test_error_when_path_in_nested_value_does_not_exist PHP Метод

test_error_when_path_in_nested_value_does_not_exist() публичный Метод

    public function test_error_when_path_in_nested_value_does_not_exist()
    {
        $value = json_encode(array('foo' => array('bar' => array())));
        $pattern = json_encode(array('foo' => array('bar' => array('faz' => 'faz value'))));
        $this->assertFalse($this->matcher->match($value, $pattern));
        $this->assertEquals($this->matcher->getError(), 'There is no element under path [foo][bar][faz] in value.');
    }