mirror of
https://github.com/awslabs/aws-crt-php.git
synced 2026-08-17 17:47:12 +00:00
* Added composer config, added IO/error tests using phpunit * Added ApiGen doc comments * Added test to ensure last_error is not set from loading up the CRT
27 lines
638 B
PHP
27 lines
638 B
PHP
<?php
|
|
|
|
require_once('tests.inc');
|
|
|
|
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));
|
|
}
|
|
}
|