Example #1
0
 public function testCaseResultExecution()
 {
     $execIncr = new ResultExecutor(function ($x) {
         return ++$x;
     });
     $phase = Phase::of(1);
     $phase->when(0, $execIncr)->when(1, $execIncr)->when(2, $execIncr);
     $this->assertEquals(2, $phase->test());
 }
Example #2
0
 public function testStrictModeInactive()
 {
     $phase = Phase::of(null);
     $this->assertNull($phase->test());
     $this->assertNull($phase->test(false));
 }