getMessage()); self::assertEquals($expectedMessage, $e->getDetail()); self::assertEquals('Invalid authorization', $e->getTitle()); self::assertEquals('INVALID_AUTHORIZATION', $e->getType()); self::assertEquals(401, $e->getStatus()); self::assertEquals(['expectedTypes' => $expectedTypes], $e->getAdditionalData()); } public function provideExpectedTypes(): iterable { yield [['foo', 'bar']]; yield [['something']]; yield [[]]; yield [['foo', 'bar', 'baz']]; } }