Files
awslabs_aws-crt-php/lib/tests/ErrorTest.php
T
Justin Boswell aee57a929d Added test-ffi target, use it in CI (#9)
* Added test-ffi target, use it in CI

* Added clang-format config, fixed RETURN_STRING API mismatch

* Skip installing php and packages on the PHP docker images

* Removed al2 job that was never going to work, and compiler tests

* Fixed basic test for extension loading

* Cleaned up lib structure, fixed tests

* use test-ci target to conditionally test in GitHub

* Use v0.8.1 of builder
2021-02-15 09:47:32 -08:00

25 lines
610 B
PHP

<?php
final class ErrorTest extends PHPUnit_Framework_TestCase {
private static $crt = null;
public static function setUpBeforeClass() {
self::$crt = new CRT();
}
public static function tearDownAfterClass() {
self::$crt = null;
}
public function testNoInitialError() {
$this->assertEquals(0, CRT::last_error());
}
public function testCanResolveErrorName() {
$this->assertEquals("AWS_ERROR_SUCCESS", CRT::error_name(0));
}
public function testCanResolveErrorStr() {
$this->assertEquals("Success.", CRT::error_str(0));
}
}