/** * @test */ public function notLesserThanIsEqualsOrGreaterThan() { $eq2 = new \PHPAccessControl\Specification\ValueBoundSpecification\Equals(2); $lt2 = new \PHPAccessControl\Specification\ValueBoundSpecification\LesserThan(2); $gt2 = new \PHPAccessControl\Specification\ValueBoundSpecification\GreaterThan(2); $this->assertTrue($lt2->not()->isEqualTo($eq2->lOr($gt2))); }
/** * @test */ public function notBothLt4OrGt2IsEqualToNotLt4AndNotGt2() { $lt4 = new \PHPAccessControl\Specification\ValueBoundSpecification\LesserThan(4); $gt2 = new \PHPAccessControl\Specification\ValueBoundSpecification\GreaterThan(2); $notBothLt4OrGt2 = $lt4->lOr($gt2)->not(); $notLt4AndNotGt2 = $lt4->not()->lAnd($gt2->not()); $this->assertTrue($notBothLt4OrGt2->isSpecialCaseOf($notLt4AndNotGt2)); $this->assertTrue($notLt4AndNotGt2->isSpecialCaseOf($notBothLt4OrGt2)); $this->assertTrue($notBothLt4OrGt2->isEqualTo($notLt4AndNotGt2)); }