public function testToFunktion() { $predicate = UnaryPredicate::create(self::getCallable()); $funktion = $predicate->toFunktion(); $this->assertInstanceOf(UnaryFunktion::class, $funktion); $this->assertEquals($predicate->getCallable(), $funktion->getCallable()); $this->assertEquals(self::getCallable(), $funktion->getCallable()); }
/** * Factory Method for Predicate. * * @param callable $predicate * @return UnaryPredicateInterface */ public static final function newUnaryPredicate(callable $predicate) : UnaryPredicateInterface { return UnaryPredicate::create($predicate); }