public function testCurlErrorHandling() { $endpoint = BlockScore::$apiEndpoint; BlockScore::$apiEndpoint = 'https://totally-legit-api-endpoint.blockscore.com'; try { self::createTestPerson(); // Always fail $this->assertTrue(false); } catch (Util\Exception $e) { $expected = 'curl_error'; $this->assertSame($expected, $e->type); $this->assertTrue($e instanceof Util\Exception); } BlockScore::$apiEndpoint = $endpoint; }