public function test_error_description_when_any_matcher_can_match() { $this->firstMatcher->expects($this->once())->method('canMatch')->will($this->returnValue(false)); $this->secondMatcher->expects($this->once())->method('canMatch')->will($this->returnValue(false)); $this->assertEquals($this->matcher->match('foo', 'foo_pattern'), false); $this->assertEquals($this->matcher->getError(), 'Any matcher from chain can\'t match value "foo" to pattern "foo_pattern"'); }
public function test_matching_array_to_array_pattern() { $this->assertTrue($this->matcher->match(array("foo", "bar"), "@array@")); $this->assertTrue($this->matcher->match(array("foo"), "@array@.inArray(\"foo\")")); $this->assertTrue($this->matcher->match(array("foo", array("bar")), array("@string@", "@array@.inArray(\"bar\")"))); }
public function test_matching_array_to_array_pattern() { $this->assertTrue($this->matcher->match(array("foo", "bar"), "@array@")); }