public function testToFunktion() { $predicate = BinaryPredicate::create(self::getCallable()); $funktion = $predicate->toFunktion(); $this->assertInstanceOf(BinaryFunktion::class, $funktion); $this->assertEquals($predicate->getCallable(), $funktion->getCallable()); $this->assertEquals(self::getCallable(), $funktion->getCallable()); }
/** * * @param callable $predicate * @return BinaryPredcateInterface */ public static final function newBinaryPredicate(callable $predicate) : BinaryPredicateInterface { return BinaryPredicate::create($predicate); }