Skip to content

Commit

Permalink
Merge pull request #878 from rquadling/fix_travis_for_hhvm
Browse files Browse the repository at this point in the history
Fix failing phpunit for hhvm
  • Loading branch information
rquadling committed Jun 22, 2016
2 parents a79b374 + bb39e68 commit 2df804c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
8 changes: 2 additions & 6 deletions .travis.yml
Expand Up @@ -12,18 +12,14 @@ php:
- 7
- hhvm

matrix:
allow_failures:
- php: hhvm

before_script:
- travis_retry composer self-update
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source --prefer-stable --prefer-lowest
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source --prefer-stable
- mysql -e 'create database phinx_testing;'
- psql -c 'create database phinx_testing;' -U postgres

script:
- phpunit --coverage-text --coverage-clover=coverage.clover
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover

after_script:
- wget https://scrutinizer-ci.com/ocular.phar
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -27,7 +27,7 @@
"symfony/yaml": "~2.8|~3.0"
},
"require-dev": {
"phpunit/phpunit": "^3.7|^4.0|^5.0"
"phpunit/phpunit": "^4.0|^5.0"
},
"autoload": {
"psr-4": {
Expand Down
8 changes: 4 additions & 4 deletions tests/Phinx/Db/Adapter/MysqlAdapterUnitTest.php
Expand Up @@ -394,8 +394,8 @@ public function testCreateTableAdvanced()
$foreignkey->expects($this->any())->method('getConstraint')->will($this->returnValue('fk1'));
$foreignkey->expects($this->any())->method('getReferencedColumns')->will($this->returnValue(array('id')));
$foreignkey->expects($this->any())->method('getReferencedTable')->will($this->returnValue($refTable));
$foreignkey->expects($this->any())->method('onDelete')->will($this->returnValue(null));
$foreignkey->expects($this->any())->method('onUpdate')->will($this->returnValue(null));
$foreignkey->expects($this->any())->method('getOnDelete')->will($this->returnValue(null));
$foreignkey->expects($this->any())->method('getOnUpdate')->will($this->returnValue(null));

$table->expects($this->any())->method('getPendingColumns')->will($this->returnValue(array($column1, $column2, $column3)));
$table->expects($this->any())->method('getName')->will($this->returnValue('table_name'));
Expand Down Expand Up @@ -1391,8 +1391,8 @@ public function testAddForeignKeyBasic()
$foreignkey->expects($this->any())->method('getConstraint')->will($this->returnValue('fk1'));
$foreignkey->expects($this->any())->method('getReferencedColumns')->will($this->returnValue(array('id')));
$foreignkey->expects($this->any())->method('getReferencedTable')->will($this->returnValue($refTable));
$foreignkey->expects($this->any())->method('onDelete')->will($this->returnValue(null));
$foreignkey->expects($this->any())->method('onUpdate')->will($this->returnValue(null));
$foreignkey->expects($this->any())->method('getOnDelete')->will($this->returnValue(null));
$foreignkey->expects($this->any())->method('getOnUpdate')->will($this->returnValue(null));

$this->assertExecuteSql('ALTER TABLE `table_name` ADD CONSTRAINT `fk1` FOREIGN KEY (`other_table_id`) REFERENCES `other_table` (`id`)');
$this->adapter->addForeignKey($table, $foreignkey);
Expand Down

0 comments on commit 2df804c

Please sign in to comment.