test() 공개 메소드

Tests the expectation. True if the text contains the substring.
public test ( string $compare ) : boolean
$compare string Comparison value.
리턴 boolean True if correct.
예제 #1
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);
 }
예제 #2
0
 function testMatchingSubString()
 {
     $expectation = new TextExpectation('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);
 }