예제 #1
0
 function testMatchingSubString()
 {
     $expectation = new WantedTextExpectation('wanted');
     $this->assertIdentical($expectation->test(''), false);
     $this->assertIdentical($expectation->test('Wanted'), false);
     $this->assertIdentical($expectation->test('wanted'), true);
     $this->assertIdentical($expectation->test('the wanted text is here'), true);
 }
예제 #2
0
 /**
  *    Tests the expectation. False if the substring appears
  *    in the text.
  *    @param string $compare        Comparison value.
  *    @return boolean               True if correct.
  *    @access public
  */
 function test($compare)
 {
     return !parent::test($compare);
 }