Example #1
0
 /**
  * @dataProvider data_adjustInto
  */
 public function test_adjustInto(Instant $test, $temporal, $expected, $expectedEx)
 {
     if ($expectedEx === null) {
         $result = $test->adjustInto($temporal);
         $this->assertEquals($result, $expected);
     } else {
         try {
             $result = $test->adjustInto($temporal);
             $this->fail();
         } catch (\Exception $ex) {
             $this->assertInstanceOf($expectedEx, $ex);
         }
     }
 }