OutsideMarginExpectation::test PHP Méthode

test() public méthode

Tests the expectation. True if it matches the held value.
public test ( mixed $compare ) : boolean
$compare mixed Comparison value.
Résultat boolean True if correct.
    public function test($compare)
    {
        return !parent::test($compare);
    }

Usage Example

 public function testOutsideFloatingPointMargin()
 {
     $within = new OutsideMarginExpectation(1.0, 0.2);
     $this->assertTrue($within->test(0.7));
     $this->assertFalse($within->test(0.8));
     $this->assertFalse($within->test(1.2));
     $this->assertTrue($within->test(1.3));
 }
OutsideMarginExpectation