public function testShouldReturnFalseWhenGivenFilterReturnsTrue() { $deniableMock = $this->filter(); $deniableMock->expects($this->once())->method('isValid')->will($this->returnValue(true)); $filter = new Not($deniableMock); $this->assertFalse($filter->isValid('Some input')); }
public function __construct($node, $parent) { parent::__construct($node, $parent); self::$possible_attributes = array_merge(parent::$possible_attributes, self::$possible_attributes); self::$required_attributes = array_merge(parent::$required_attributes, self::$required_attributes); self::$possible_children = array_merge(parent::$possible_children, self::$possible_children); self::$required_children = array_merge(parent::$required_children, self::$required_children); }
/** * @dataProvider providerForInvalidNot * @expectedException Respect\Validation\Exceptions\ValidationException */ public function testNotNotHaha($v, $input) { $not = new Not($v); $this->assertFalse($not->assert($input)); }