Skip to content

Commit

Permalink
adding phpunit bootstrap so tests run on travis, removing composer se…
Browse files Browse the repository at this point in the history
…lf-update, locking versions
  • Loading branch information
jaydiablo committed Apr 30, 2018
1 parent e0df2ed commit fb0fae2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ branches:
only:
master

before_install:
- travis_retry composer self-update

install:
- phpenv rehash
- travis_retry composer install --no-interaction --prefer-source
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"prefer-stable": true,
"require": {
"php": ">=7.0.0",
"diablomedia/zendframework1-auth": "dev-master",
"diablomedia/zendframework1-db": "dev-master"
"diablomedia/zendframework1-auth": "^1.0.0",
"diablomedia/zendframework1-db": "^1.0.0"
},
"autoload": {
"psr-0": {
Expand Down
14 changes: 14 additions & 0 deletions phpunit-bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

if (getenv('TRAVIS')) {
/**
* Zend_Auth_Adapter_DbTable tests
*/
defined('TESTS_ZEND_AUTH_ADAPTER_DBTABLE_PDO_SQLITE_ENABLED') || define('TESTS_ZEND_AUTH_ADAPTER_DBTABLE_PDO_SQLITE_ENABLED', true);
}

/**
* Zend_Auth_Adapter_DbTable tests
*/
defined('TESTS_ZEND_AUTH_ADAPTER_DBTABLE_PDO_SQLITE_ENABLED') || define('TESTS_ZEND_AUTH_ADAPTER_DBTABLE_PDO_SQLITE_ENABLED', false);
defined('TESTS_ZEND_AUTH_ADAPTER_DBTABLE_PDO_SQLITE_DATABASE') || define('TESTS_ZEND_AUTH_ADAPTER_DBTABLE_PDO_SQLITE_DATABASE', ':memory:');
7 changes: 2 additions & 5 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@
beStrictAboutTestsThatDoNotTestAnything="true"
backupGlobals="true"
stderr="true"
colors="true">
<php>
<const name="TESTS_ZEND_AUTH_ADAPTER_DBTABLE_PDO_SQLITE_ENABLED" value="false" />
<const name="TESTS_ZEND_AUTH_ADAPTER_DBTABLE_PDO_SQLITE_DATABASE" value=":memory:" />
</php>
colors="true"
bootstrap="./phpunit-bootstrap.php">
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
Expand Down

0 comments on commit fb0fae2

Please sign in to comment.