function testInt() { $expectation = new IsAExpectation('int'); $this->assertTrue($expectation->test(5)); $this->assertFalse($expectation->test(5.0)); }
/** * Tests the expectation. False if the type or * class matches the string value. * @param string $compare Comparison value. * @return boolean True if different. * @access public */ function test($compare) { return !parent::test($compare); }
function testNull() { $expectation = new IsAExpectation('null'); $this->assertTrue($expectation->test(null)); $this->assertFalse($expectation->test('string')); }