| @@ 208-217 (lines=10) @@ | ||
| 205 | /** |
|
| 206 | * @test |
|
| 207 | */ |
|
| 208 | public function it_throws_an_exception_if_class_is_final() |
|
| 209 | { |
|
| 210 | $class = new \ReflectionClass('Fixtures\Prophecy\FinalClass'); |
|
| 211 | ||
| 212 | $mirror = new ClassMirror(); |
|
| 213 | ||
| 214 | $this->setExpectedException('Prophecy\Exception\Doubler\ClassMirrorException'); |
|
| 215 | ||
| 216 | $mirror->reflect($class, array()); |
|
| 217 | } |
|
| 218 | ||
| 219 | /** |
|
| 220 | * @test |
|
| @@ 251-260 (lines=10) @@ | ||
| 248 | /** |
|
| 249 | * @test |
|
| 250 | */ |
|
| 251 | public function it_throws_an_exception_if_interface_provided_instead_of_class() |
|
| 252 | { |
|
| 253 | $class = new \ReflectionClass('Fixtures\Prophecy\EmptyInterface'); |
|
| 254 | ||
| 255 | $mirror = new ClassMirror(); |
|
| 256 | ||
| 257 | $this->setExpectedException('Prophecy\Exception\InvalidArgumentException'); |
|
| 258 | ||
| 259 | $mirror->reflect($class, array()); |
|
| 260 | } |
|
| 261 | ||
| 262 | /** |
|
| 263 | * @test |
|