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:
Justin Boswell
2021-02-09 10:26:41 -08:00
committed by GitHub
parent 3fed547551
commit 7b5ccfd55a
10 changed files with 1686 additions and 8 deletions
+26
View File
@@ -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));
}
}