Class NoPatternExpectation

Description

Fail if a pattern is detected within the comparison.

Located in /expectation.php (line 678)

SimpleExpectation
   |
   --PatternExpectation
      |
      --NoPatternExpectation
Direct descendents
Class Description
 class UnwantedPatternExpectation
Method Summary
 NoPatternExpectation NoPatternExpectation (string $pattern, [string $message = '%s'])
 boolean test (string $compare)
 string testMessage (string $compare)
Variables
Methods
Constructor NoPatternExpectation (line 686)

Sets the reject pattern

  • access: public
NoPatternExpectation NoPatternExpectation (string $pattern, [string $message = '%s'])
  • string $pattern: Pattern to search for.
  • string $message: Customised message on failure.
test (line 697)

Tests the expectation. False if the Perl regex matches the comparison value.

  • return: True if correct.
  • access: public
boolean test (string $compare)
  • string $compare: Comparison value.

Redefinition of:
PatternExpectation::test()
Tests the expectation. True if the Perl regex matches the comparison value.
testMessage (line 708)

Returns a human readable test message.

  • return: Description of success or failure.
  • access: public
string testMessage (string $compare)
  • string $compare: Comparison value.

Redefinition of:
PatternExpectation::testMessage()
Returns a human readable test message.

Inherited Methods

Inherited From PatternExpectation

 PatternExpectation::PatternExpectation()
 PatternExpectation::test()
 PatternExpectation::testMessage()
 PatternExpectation::_describePatternMatch()
 PatternExpectation::_getPattern()

Inherited From SimpleExpectation

 SimpleExpectation::SimpleExpectation()
 SimpleExpectation::isExpectation()
 SimpleExpectation::overlayMessage()
 SimpleExpectation::test()
 SimpleExpectation::testMessage()
 SimpleExpectation::_getDumper()

Documentation generated on Sun, 04 May 2008 09:21:35 -0500 by phpDocumentor 1.3.0