Coduo\PHPMatcher\Tests\Matcher\JsonMatcherTest::test_error_when_path_in_nested_pattern_does_not_exist PHP Method

test_error_when_path_in_nested_pattern_does_not_exist() public method

    public function test_error_when_path_in_nested_pattern_does_not_exist()
    {
        $value = json_encode(array('foo' => array('bar' => array('baz' => 'bar value'))));
        $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][baz] in pattern.');
    }