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());
 }
Example #2
0
 /**
  * Factory Method for Predicate.
  *
  * @param callable $predicate
  * @return UnaryPredicateInterface
  */
 public static final function newUnaryPredicate(callable $predicate) : UnaryPredicateInterface
 {
     return UnaryPredicate::create($predicate);
 }