mirror of
https://github.com/awslabs/aws-crt-php.git
synced 2026-08-18 01:57:13 +00:00
Unit tests and I/O bindings (#8)
* 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
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user