| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function testApply() |
||
| 23 | { |
||
| 24 | $this |
||
| 25 | /* @var \Cubiche\Core\Selector\Property $property */ |
||
| 26 | ->given($property = $this->newTestedInstance('foo')) |
||
| 27 | ->then() |
||
| 28 | ->string($property->apply((object) array('foo' => 'bar'))) |
||
| 29 | ->isEqualTo('bar') |
||
| 30 | ->exception(function () use ($property) { |
||
| 31 | $property->apply(null); |
||
| 32 | })->isInstanceOf(\RuntimeException::class) |
||
| 33 | ->exception(function () use ($property) { |
||
| 34 | $property->apply((object) array()); |
||
| 35 | })->isInstanceOf(\RuntimeException::class) |
||
| 36 | ; |
||
| 37 | } |
||
| 38 | } |
||
| 39 |