Cleanup pass based on prior PRs (#21)

* Updates to stub generation

* More idiomatic fixes from PHP team

* Moved tests from src/tests -> tests, got rid of extension-only tests

* fixed up test paths, regenerated arginfo
This commit is contained in:
Justin Boswell
2021-05-05 13:37:47 -07:00
committed by GitHub
parent 531330e1b2
commit 7e925c92fb
30 changed files with 99 additions and 119 deletions
+14 -2
View File
@@ -1,3 +1,15 @@
<?php
// Common setup for tests:
?>
/**
* 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 {
// 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()));
}
}
}