Exemple #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);
 }
 /**
  *    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);
 }