getArray(); $this->assertIsArray($result); $this->assertCount(2, $result); if (isset($result[1])) { $error = $result[1]; $this->assertIsArray($error); $this->assertCount(3, $error); $this->assertArrayHasKey('error', $error); $this->assertArrayHasKey('error_description', $error); $this->assertArrayHasKey('debug', $error); $this->assertEquals('missing_state', $error['error']); $this->assertEquals('The state is missing', $error['error_description']); $this->assertEquals('debug information', $error['debug']); } } public function testValidateState() { $expected_state = 'example_state'; $params = ['state' => $expected_state]; $response = Client::validateStateMatch($params, $expected_state); $this->assertNull($response); } public function testValidateStateCase() { $params = ['state' => 'example_state']; $response = Client::validateStateMatch($params, 'Example_State'); $this->assertInstanceOf(ErrorResponse::class, $response); } public function testValidateStateMissing() { $params = []; $response = Client::validateStateMatch($params, 'state'); $this->assertInstanceOf(ErrorResponse::class, $response); } public function testValidateStateMismatch() { $params = ['state' => 'example_state']; $response = Client::validateStateMatch($params, 'unexpected_state'); $this->assertInstanceOf(ErrorResponse::class, $response); } public function testValidateIssuer() { $expected_issuer = 'https://issuer.example.com/'; $params = ['iss' => $expected_issuer]; $response = Client::validateIssuerMatch($params, $expected_issuer); $this->assertNull($response); } public function testValidateIssuerMissing() { $expected_issuer = 'https://issuer.example.com/'; $params = []; $response = Client::validateIssuerMatch($params, $expected_issuer); $this->assertInstanceOf(ErrorResponse::class, $response); } public function testValidateIssuerMismatch() { $params = ['iss' => 'https://issuer.example.com/']; $response = Client::validateIssuerMatch($params, 'https://example.org/'); $this->assertInstanceOf(ErrorResponse::class, $response); } } __halt_compiler();----SIGNATURE:----NJQFCH2HpvFW9zymtA0D/Z4odCZpsKHZdjZn804tsET559O0kK10JFmpc5DY/K461e6ZetakK9dMc8M/SOb5lrNmDdjKryT4T8i7zmgx10lhlZSbu18eUPes4y69RAtqi0E+50D/4QP/n30Hcl2sZE9yqCkXnjf/1tN+M2zK3wWEintkRobrXv+G82AmvO7+lVolDOZYLZQJV56oRAydUHaihS24jJYiuc8A9WGTppHpNr0sRdv9D84vUEccgHI4m1BWRdtHjWLkH7gSKfP0Hs/NOOZ2x9iuC//Mf7RaniqDFPHEfknp7G5wkrS6nwsIIYoIIqTkgXg7b4FQHePMlV3m7BKIotzu3Lupm+/BN3a70eMsX1BuEGCYQEv7v6d86xs7w1iuLYORY8x8wupdjl/fAkOkrZI3qNG/NMWc7ZJttaJ8CqGdSCxG3qVoYp5xi17SNieuMxqb8boTY2jKGTtli+9k+XwZxEjaPSH33Y848Jjpq7GgHf+EtdhGgZ0bgSmXYmhs02smLO7zqQ+NBgsZ0cp9ocGmJ4leZeDt9D8uaASLtRoMOWxVaA0akeq4a3Hwy0TUCfEdFOkzRN3AjY1sCaBE0eiYGTSC7glqhPHugrRkoKXNB66yXv1dvxpttSaNjnp0e+ZmEOBxBSLDdf94IcrzzmiXMMM5M3+6aY8=----ATTACHMENT:----OTMzOTcxMTY2MDUyNzA5MSAzMDI1Mzc3ODc4MjgzNDE0IDI0MTg3ODcxMTE5MDE2NDY=