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