diff --git a/tests/OpenAPI/V2/Tools/AuthcodetoopenidTest.php b/tests/OpenAPI/V2/Tools/AuthcodetoopenidTest.php index 6c26e7a..f495965 100644 --- a/tests/OpenAPI/V2/Tools/AuthcodetoopenidTest.php +++ b/tests/OpenAPI/V2/Tools/AuthcodetoopenidTest.php @@ -52,7 +52,7 @@ private function prepareEnvironment(string $secret): \WeChatPay\BuilderChainable } /** - * @return array,string,?string}> + * @return array,string,?class-string}> */ public function mockDataProvider(): array { @@ -107,7 +107,7 @@ public function mockDataProvider(): array * @dataProvider mockDataProvider * @param array $data * @param string $secret - * @param ?string $expected + * @param ?class-string $expected */ public function testResponseState(array $data, string $secret, ?string $expected = null): void { @@ -123,7 +123,7 @@ public function testResponseState(array $data, string $secret, ?string $expected try { $endpoint->post(['xml' => ['appid' => '123', 'mch_id' => '123', 'auth_code' => '123']]); } catch (\Throwable $e) { - self::assertEquals($expected, $e::class); + self::assertInstanceOf($expected, $e); if ($e instanceof RejectionException && ($response = $e->getReason()) instanceof ResponseInterface) { $err = Transformer::toArray((string)$response->getBody()); //three cases, maybe return_code and/or result_code 'FAIL'