|
9 | 9 | */ |
10 | 10 | class ParserTest extends DynamicParserTest |
11 | 11 | { |
12 | | - public function setUp() |
| 12 | + protected function setUp(): void |
13 | 13 | { |
14 | 14 | parent::setup(); |
15 | 15 | $this->parser = new Parser; |
@@ -73,15 +73,16 @@ public function parseConcreteFixture() |
73 | 73 |
|
74 | 74 | /** |
75 | 75 | * @test |
76 | | - * @expectedException \Minime\Annotations\ParserException |
77 | 76 | * @dataProvider invalidConcreteAnnotationFixtureProvider |
78 | 77 | */ |
79 | 78 | public function parseInvalidConcreteFixture($fixture) |
80 | 79 | { |
| 80 | + $this->expectException(ParserException::class); |
| 81 | + |
81 | 82 | $this->getFixture($fixture); |
82 | 83 | } |
83 | 84 |
|
84 | | - public function invalidConcreteAnnotationFixtureProvider() |
| 85 | + public static function invalidConcreteAnnotationFixtureProvider() |
85 | 86 | { |
86 | 87 | return [ |
87 | 88 | ['bad_concrete_fixture'], |
@@ -140,28 +141,31 @@ public function tolerateUnrecognizedTypes() |
140 | 141 |
|
141 | 142 | /** |
142 | 143 | * @test |
143 | | - * @expectedException \Minime\Annotations\ParserException |
144 | 144 | */ |
145 | 145 | public function exceptionWithBadJsonValue() |
146 | 146 | { |
| 147 | + $this->expectException(ParserException::class); |
| 148 | + |
147 | 149 | $this->getFixture('bad_json_fixture'); |
148 | 150 | } |
149 | 151 |
|
150 | 152 | /** |
151 | 153 | * @test |
152 | | - * @expectedException \Minime\Annotations\ParserException |
153 | 154 | */ |
154 | 155 | public function exceptionWithBadIntegerValue() |
155 | 156 | { |
| 157 | + $this->expectException(ParserException::class); |
| 158 | + |
156 | 159 | $this->getFixture('bad_integer_fixture'); |
157 | 160 | } |
158 | 161 |
|
159 | 162 | /** |
160 | 163 | * @test |
161 | | - * @expectedException \Minime\Annotations\ParserException |
162 | 164 | */ |
163 | 165 | public function exceptionWithBadFloatValue() |
164 | 166 | { |
| 167 | + $this->expectException(ParserException::class); |
| 168 | + |
165 | 169 | $this->getFixture('bad_float_fixture'); |
166 | 170 | } |
167 | 171 |
|
|
0 commit comments