SimpleTest


SimpleTest\UnwantedTextExpectation
web_tester.php at line 398

Class UnwantedTextExpectation

SimpleExpectation
└─WantedTextExpectation
└─UnwantedTextExpectation

public class UnwantedTextExpectation
extends WantedTextExpectation

Fail if a substring is detected within the comparison text.

Subpackage:
UnitTester

Constructor Summary

UnwantedTextExpectation(string substring, string message)

Sets the reject pattern

Method Summary
boolean

test(string compare)

Tests the expectation.

string

testMessage(string compare)

Returns a human readable test message.

Methods inherited from SimpleTest\WantedTextExpectation
test, testMessage
Methods inherited from SimpleTest\SimpleExpectation
overlayMessage, test, testMessage

Constructor Detail

web_tester.php at line 406

UnwantedTextExpectation

public UnwantedTextExpectation(string substring, string message)

Sets the reject pattern

Parameters:
substring - Text to search for.
message - Customised message on failure.

Method Detail

web_tester.php at line 417

test

public boolean test(string compare)

Tests the expectation. False if the substring appears in the text.

Parameters:
compare - Comparison value.
Returns:
True if correct.

web_tester.php at line 428

testMessage

public string testMessage(string compare)

Returns a human readable test message.

Parameters:
compare - Comparison value.
Returns:
Description of success or failure.

SimpleTest