mirror of
https://github.com/awslabs/aws-crt-php.git
synced 2026-08-17 17:47:12 +00:00
* 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)
30 lines
872 B
PHP
30 lines
872 B
PHP
<?php
|
|
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
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);
|
|
}
|
|
}
|