mirror of
https://github.com/awslabs/aws-crt-php.git
synced 2026-08-18 01:57:13 +00:00
Implemented async callbacks to PHP regardless of thread model, Sigv4 signing (#24)
* Updated to get latest aws-crt-ffi * Added implementation for signing_result * Added main thread queue and callback queueing to signing process * Updated to get support for date on signing_config_aws * added date support to SigningConfigAWS, fixed up reference issues on http message signing * Broke C code into separate files, moved common stuff to php_aws_crt.h * Use a unity build to make PHP do the right thing with our lib * Updated aws-crt-ffi to v0.1.3 to get sigv4 changes * Added CRT::isAvailable for safe runtime detection of CRT * Fixed up test resource safety, added tests to prove it * Added CI jobs for every version of PHP on linux (#26)
This commit is contained in:
@@ -6,10 +6,24 @@
|
||||
use AWS\CRT\CRT as CRT;
|
||||
|
||||
abstract class CrtTestCase extends PHPUnit_Framework_TestCase {
|
||||
private static $crt = null;
|
||||
public static function setUpBeforeClass() {
|
||||
self::$crt = new CRT();
|
||||
}
|
||||
|
||||
public static function tearDownAfterClass() {
|
||||
self::$crt = null;
|
||||
}
|
||||
|
||||
// Ensure that after every test there are no errors in the CRT itself
|
||||
protected function assertPostConditions() {
|
||||
if (CRT::last_error()) {
|
||||
$this->fail("Test left an error on the stack: " . CRT::error_name(CRT::last_error()));
|
||||
}
|
||||
}
|
||||
|
||||
// shim expectException -> setExpectedException for PHPUnit 4.8.x
|
||||
public function expectException($exceptionName) {
|
||||
$this->setExpectedException($exceptionName);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user