Skip to content

Commit

Permalink
Merge branch 'add-travis-tests'
Browse files Browse the repository at this point in the history
  • Loading branch information
derickr committed Sep 26, 2017
2 parents 44ef7d3 + c356fd5 commit b08f26b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,3 +1,4 @@
vendor
run-tests-tmp
extract
extract
composer.lock
19 changes: 19 additions & 0 deletions .travis.yml
@@ -0,0 +1,19 @@
language: php

php:
- 5.6
- 7.0
- 7.1
- 7.2
- nightly

matrix:
allow_failures:
- php: nightly

before_script:
- composer self-update
- composer update

script:
- vendor/bin/phpunit
2 changes: 2 additions & 0 deletions composer.json
Expand Up @@ -54,6 +54,8 @@
"zetacomponents/base": "~1.8"
},
"require-dev": {
"phpunit/phpunit": "~5.7",
"zetacomponents/database-schema": "~1.5",
"zetacomponents/unit-test": "*"
}
}
3 changes: 3 additions & 0 deletions tests/bootstrap.php
Expand Up @@ -12,3 +12,6 @@
EOT
);
}

$db = ezcDbFactory::create( "sqlite://:memory:" );
ezcDbInstance::set( $db );
4 changes: 1 addition & 3 deletions tests/transactions_test.php
Expand Up @@ -70,9 +70,7 @@ protected function setUp()
{
try
{
$dbparams = ezcTestSettings::getInstance()->db->dsn;
MyDB::setParams( $dbparams );
$this->db = MyDB::create();
$this->db = ezcDbInstance::get();
}
catch ( Exception $e )
{
Expand Down

0 comments on commit b08f26b

Please sign in to comment.