Inheritance: extends SimpleExpectation
Exemplo n.º 1
0
 /**
  *    Tests the expectation. False if the Perl regex
  *    matches the comparison value.
  *    @param string $compare        Comparison value.
  *    @return boolean               True if correct.
  *    @access public
  */
 function test($compare)
 {
     return !parent::test($compare);
 }
Exemplo n.º 2
0
 function testWanted()
 {
     $pattern = new PatternExpectation('/hello/i');
     $this->assertTrue($pattern->test("Hello world"));
     $this->assertFalse($pattern->test("Goodbye world"));
 }