This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from jeremygiberson/master
Adding unit tests
- Loading branch information
Showing
23 changed files
with
781 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.idea/ | ||
vendor/ | ||
composer.lock | ||
tests/integration/data/ignore/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
language: php | ||
php: | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
env: | ||
- DB=sqlite | ||
- DB=mysql | ||
- DB=mysqli | ||
- DB=postgresql | ||
|
||
matrix: | ||
allow_failures: | ||
- php: 5.4 | ||
env: DB=postgresql | ||
- php: 5.5 | ||
env: DB=postgresql | ||
- php: 5.6 | ||
env: DB=postgresql | ||
|
||
services: | ||
- postgresql | ||
|
||
before_script: | ||
- composer install | ||
- mysql -e "create database IF NOT EXISTS test;" -uroot | ||
- psql -c 'create database test;' -U postgres | ||
|
||
script: phpunit -c phpunit.${DB}.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.6/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
> | ||
<testsuites> | ||
<testsuite name="Integration Tests"> | ||
<directory>tests/integration</directory> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<env name="db_type" value="Pdo_Mysql"/> | ||
<env name="db_host" value="localhost" /> | ||
<env name="db_username" value="travis" /> | ||
<env name="db_password" value="" /> | ||
<env name="db_name" value="test" /> | ||
<env name="db_port" value=""/> | ||
</php> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.6/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
> | ||
<testsuites> | ||
<testsuite name="Integration Tests"> | ||
<directory>tests/integration</directory> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<env name="db_type" value="Mysqli"/> | ||
<env name="db_host" value="localhost" /> | ||
<env name="db_username" value="travis" /> | ||
<env name="db_password" value="" /> | ||
<env name="db_name" value="test" /> | ||
<env name="db_port" value=""/> | ||
</php> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.6/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
> | ||
<testsuites> | ||
<testsuite name="Integration Tests"> | ||
<directory>tests/integration</directory> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<env name="db_type" value="Pdo_Pgsql"/> | ||
<env name="db_host" value="localhost" /> | ||
<env name="db_username" value="postgres" /> | ||
<env name="db_password" value="" /> | ||
<env name="db_name" value="test" /> | ||
<env name="db_port" value="5432"/> | ||
</php> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.6/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
> | ||
<testsuites> | ||
<testsuite name="Integration Tests"> | ||
<directory>tests/integration</directory> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<env name="db_type" value="Pdo_Sqlite"/> | ||
<env name="db_host" value="" /> | ||
<env name="db_username" value="" /> | ||
<env name="db_password" value="" /> | ||
<env name="db_name" value="%BASE_DIR%/tests/integration/data/ignore/db.sqlite" /> | ||
<env name="db_port" value=""/> | ||
</php> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.6/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
> | ||
<testsuites> | ||
<testsuite name="Unit Tests"> | ||
<directory>tests/unit</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.