test() public method

Tests the expectation. True if it differs from the held value.
public test ( mixed $compare ) : boolean
$compare mixed Comparison value.
return boolean True if correct.
 function testStringMismatch()
 {
     $not_hello = new NotEqualExpectation("Hello");
     $this->assertTrue($not_hello->test("Goodbye"));
     $this->assertFalse($not_hello->test("Hello"));
 }
Beispiel #2
0
 function testStringMismatch()
 {
     $not_hello = new NotEqualExpectation("Hello");
     $this->assertTrue($not_hello->test("Goodbye"));
     $this->assertFalse($not_hello->test("Hello"));
     $this->assertPattern('/at character 0/', $not_hello->testMessage("Goodbye"));
     $this->assertPattern('/matches/', $not_hello->testMessage("Hello"));
 }
 public function testStringMismatch()
 {
     $not_hello = new NotEqualExpectation('Hello');
     $this->assertTrue($not_hello->test('Goodbye'));
     $this->assertFalse($not_hello->test('Hello'));
 }