| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function testGetChallengeError() { |
||
| 14 | |||
| 15 | $rawResponse = Connector\RawResponse::createDummyFrom( |
||
| 16 | Connector\RawResponse::HEADER_200, |
||
| 17 | file_get_contents(dirname(__FILE__, 2) . DIRECTORY_SEPARATOR . '_JSONSamples' . DIRECTORY_SEPARATOR . 'ChallengeError.json') |
||
| 18 | ); |
||
| 19 | |||
| 20 | $response = new \LE_ACME2\Response\Authorization\Get($rawResponse); |
||
| 21 | $challenge = $response->getChallenge('http-01'); |
||
| 22 | |||
| 23 | $error = $challenge->error; |
||
| 24 | $this->assertTrue(is_object($error) === true); |
||
| 25 | $this->assertTrue($error->type === 'urn:ietf:params:acme:error:dns'); |
||
| 26 | $this->assertTrue($error->detail === "DNS problem: SERVFAIL looking up CAA for domain1.tld - the domain's nameservers may be malfunctioning"); |
||
| 27 | $this->assertTrue($error->status === 400); |
||
| 28 | } |
||
| 29 | } |