@@ -144,13 +144,13 @@ public function testPassingYourOwnSetOfTagHandlers(): void
144144
145145 /**
146146 * @covers ::create
147- * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
148- * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
149- * @expectedException \InvalidArgumentException
150- * @expectedExceptionMessage The tag "@user[myuser" does not seem to be wellformed, please check it for errors
147+ * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
148+ * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
151149 */
152- public function testExceptionIsThrownIfProvidedTagIsNotWellformed (): void
150+ public function testExceptionIsThrownIfProvidedTagIsNotWellformed () : void
153151 {
152+ $ this ->expectException ('InvalidArgumentException ' );
153+ $ this ->expectExceptionMessage ('The tag "@user[myuser" does not seem to be wellformed, please check it for errors ' );
154154 $ tagFactory = new StandardTagFactory (m::mock (FqsenResolver::class));
155155 $ tagFactory ->create ('@user[myuser ' );
156156 }
@@ -235,55 +235,51 @@ public function testRegisteringAHandlerForANewTag(): void
235235 * @covers ::registerTagHandler
236236 * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
237237 * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
238- * @expectedException \InvalidArgumentException
239238 */
240- public function testHandlerRegistrationFailsIfProvidedTagNameIsNamespaceButNotFullyQualified (): void
239+ public function testHandlerRegistrationFailsIfProvidedTagNameIsNamespaceButNotFullyQualified () : void
241240 {
241+ $ this ->expectException ('InvalidArgumentException ' );
242242 $ resolver = m::mock (FqsenResolver::class);
243243 $ tagFactory = new StandardTagFactory ($ resolver );
244-
245244 $ tagFactory ->registerTagHandler ('Name\Spaced\Tag ' , Author::class);
246245 }
247246
248247 /**
249248 * @covers ::registerTagHandler
250249 * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
251250 * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
252- * @expectedException \InvalidArgumentException
253251 */
254- public function testHandlerRegistrationFailsIfProvidedHandlerIsEmpty (): void
252+ public function testHandlerRegistrationFailsIfProvidedHandlerIsEmpty () : void
255253 {
254+ $ this ->expectException ('InvalidArgumentException ' );
256255 $ resolver = m::mock (FqsenResolver::class);
257256 $ tagFactory = new StandardTagFactory ($ resolver );
258-
259257 $ tagFactory ->registerTagHandler ('my-tag ' , '' );
260258 }
261259
262260 /**
263261 * @covers ::registerTagHandler
264262 * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
265263 * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
266- * @expectedException \InvalidArgumentException
267264 */
268- public function testHandlerRegistrationFailsIfProvidedHandlerIsNotAnExistingClassName (): void
265+ public function testHandlerRegistrationFailsIfProvidedHandlerIsNotAnExistingClassName () : void
269266 {
267+ $ this ->expectException ('InvalidArgumentException ' );
270268 $ resolver = m::mock (FqsenResolver::class);
271269 $ tagFactory = new StandardTagFactory ($ resolver );
272-
273270 $ tagFactory ->registerTagHandler ('my-tag ' , 'IDoNotExist ' );
274271 }
275272
276273 /**
277274 * @covers ::registerTagHandler
278275 * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
279276 * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
280- * @expectedException \InvalidArgumentException
281277 */
282- public function testHandlerRegistrationFailsIfProvidedHandlerDoesNotImplementTheTagInterface (): void
278+ public function testHandlerRegistrationFailsIfProvidedHandlerDoesNotImplementTheTagInterface () : void
283279 {
280+ $ this ->expectException ('InvalidArgumentException ' );
284281 $ resolver = m::mock (FqsenResolver::class);
285282 $ tagFactory = new StandardTagFactory ($ resolver );
286-
287283 $ tagFactory ->registerTagHandler ('my-tag ' , 'stdClass ' );
288284 }
289285
0 commit comments