From 46105abecd29138714782e9a8c0d7c085943e362 Mon Sep 17 00:00:00 2001 From: "Paul M. Jones" Date: Fri, 27 Mar 2015 14:57:14 -0500 Subject: [PATCH] restructure testing, and update support files --- .travis.yml | 3 ++- README.md | 4 ++-- autoload.php | 6 +----- phpunit.php | 3 +++ tests/unit/phpunit.xml => phpunit.xml.dist | 4 ++-- tests/{unit/src => }/AbstractExtendedPdoTest.php | 0 tests/{unit/src => }/ConnectionLocatorTest.php | 0 tests/{unit/src => }/DecoratedPdoTest.php | 0 tests/{unit/src => }/ExtendedPdoTest.php | 0 tests/{unit/src => }/FakeObject.php | 0 tests/{unit/src => }/PdoDependent.php | 0 tests/{unit/src => }/ProfilerTest.php | 0 tests/unit/bootstrap.php | 16 ---------------- 13 files changed, 10 insertions(+), 26 deletions(-) create mode 100644 phpunit.php rename tests/unit/phpunit.xml => phpunit.xml.dist (52%) rename tests/{unit/src => }/AbstractExtendedPdoTest.php (100%) rename tests/{unit/src => }/ConnectionLocatorTest.php (100%) rename tests/{unit/src => }/DecoratedPdoTest.php (100%) rename tests/{unit/src => }/ExtendedPdoTest.php (100%) rename tests/{unit/src => }/FakeObject.php (100%) rename tests/{unit/src => }/PdoDependent.php (100%) rename tests/{unit/src => }/ProfilerTest.php (100%) delete mode 100644 tests/unit/bootstrap.php diff --git a/.travis.yml b/.travis.yml index 3829bf1c..78ab1480 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,9 @@ php: - 5.5 - 5.6 - hhvm + - 7 script: - - phpunit -c tests/unit/ --coverage-clover=coverage.clover + - phpunit --coverage-clover=coverage.clover after_script: - wget https://scrutinizer-ci.com/ocular.phar - php ocular.phar code-coverage:upload --format=php-clover coverage.clover diff --git a/README.md b/README.md index f9e17907..5e78f37d 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Added functionality in _Aura.Sql_ over the native _PDO_ includes: ### Installation -This library requires PHP 5.3 or later, and has no userland dependencies. +This library requires PHP 5.3 or later; we recommend using the latest available version of PHP as a matter of principle. It has no userland dependencies. It is installable and autoloadable via Composer as [aura/sql](https://packagist.org/packages/aura/sql). @@ -57,7 +57,7 @@ Alternatively, [download a release](https://github.com/auraphp/Aura.Sql/releases [![Code Coverage](https://scrutinizer-ci.com/g/auraphp/Aura.Sql/badges/coverage.png?b=develop-2)](https://scrutinizer-ci.com/g/auraphp/Aura.Sql/) [![Build Status](https://travis-ci.org/auraphp/Aura.Sql.png?branch=develop-2)](https://travis-ci.org/auraphp/Aura.Sql) -To run the unit tests at the command line, issue `phpunit -c tests/unit/`. (This requires [PHPUnit][] to be available as `phpunit`.) +To run the unit tests at the command line, issue `phpunit` at the package root. (This requires [PHPUnit][] to be available as `phpunit`.) [PHPUnit]: http://phpunit.de/manual/ diff --git a/autoload.php b/autoload.php index 2e87a71c..cf46c00a 100644 --- a/autoload.php +++ b/autoload.php @@ -6,13 +6,9 @@ // what prefixes should be recognized? $prefixes = array( - "{$ns}\_Config\\" => array( - __DIR__ . '/config', - __DIR__ . '/tests/container/src', - ), "{$ns}\\" => array( __DIR__ . '/src', - __DIR__ . '/tests/unit/src', + __DIR__ . '/tests', ), ); diff --git a/phpunit.php b/phpunit.php new file mode 100644 index 00000000..c1a38d6b --- /dev/null +++ b/phpunit.php @@ -0,0 +1,3 @@ + + - ./src + ./tests diff --git a/tests/unit/src/AbstractExtendedPdoTest.php b/tests/AbstractExtendedPdoTest.php similarity index 100% rename from tests/unit/src/AbstractExtendedPdoTest.php rename to tests/AbstractExtendedPdoTest.php diff --git a/tests/unit/src/ConnectionLocatorTest.php b/tests/ConnectionLocatorTest.php similarity index 100% rename from tests/unit/src/ConnectionLocatorTest.php rename to tests/ConnectionLocatorTest.php diff --git a/tests/unit/src/DecoratedPdoTest.php b/tests/DecoratedPdoTest.php similarity index 100% rename from tests/unit/src/DecoratedPdoTest.php rename to tests/DecoratedPdoTest.php diff --git a/tests/unit/src/ExtendedPdoTest.php b/tests/ExtendedPdoTest.php similarity index 100% rename from tests/unit/src/ExtendedPdoTest.php rename to tests/ExtendedPdoTest.php diff --git a/tests/unit/src/FakeObject.php b/tests/FakeObject.php similarity index 100% rename from tests/unit/src/FakeObject.php rename to tests/FakeObject.php diff --git a/tests/unit/src/PdoDependent.php b/tests/PdoDependent.php similarity index 100% rename from tests/unit/src/PdoDependent.php rename to tests/PdoDependent.php diff --git a/tests/unit/src/ProfilerTest.php b/tests/ProfilerTest.php similarity index 100% rename from tests/unit/src/ProfilerTest.php rename to tests/ProfilerTest.php diff --git a/tests/unit/bootstrap.php b/tests/unit/bootstrap.php deleted file mode 100644 index e142b596..00000000 --- a/tests/unit/bootstrap.php +++ /dev/null @@ -1,16 +0,0 @@ -