Commit b385c9d3 authored by Steve Müller's avatar Steve Müller

Merge pull request #602 from doctrine/feature/hhvm-nightly-php-5.6

HHVM nightly and PHP 5.6 in builds
parents 171a8762 850e3fae
......@@ -4,7 +4,9 @@ php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
- hhvm-nightly
env:
- DB=mysql
......@@ -15,7 +17,6 @@ env:
- DB=mysqli
before_script:
- sh -c "if [ '$TRAVIS_PHP_VERSION' = 'hhvm' ]; then sudo apt-get remove --auto-remove hhvm; sudo apt-get update; sudo apt-get install -y --force-yes hhvm-nightly; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests;' -U postgres; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests_tmp;' -U postgres; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database doctrine_tests;' -U postgres; fi"
......@@ -31,6 +32,7 @@ script: phpunit --configuration tests/travis/$DB.travis.xml
matrix:
allow_failures:
- php: hhvm
- php: hhvm-nightly
exclude:
- php: hhvm
env: DB=pgsql POSTGRESQL_VERSION=9.1 # driver currently unsupported by HHVM
......@@ -38,3 +40,9 @@ matrix:
env: DB=pgsql POSTGRESQL_VERSION=9.2 # driver currently unsupported by HHVM
- php: hhvm
env: DB=pgsql POSTGRESQL_VERSION=9.3 # driver currently unsupported by HHVM
- php: hhvm-nightly
env: DB=pgsql POSTGRESQL_VERSION=9.1 # driver currently unsupported by HHVM
- php: hhvm-nightly
env: DB=pgsql POSTGRESQL_VERSION=9.2 # driver currently unsupported by HHVM
- php: hhvm-nightly
env: DB=pgsql POSTGRESQL_VERSION=9.3 # driver currently unsupported by HHVM
......@@ -25,7 +25,7 @@ class PDOExceptionTest extends DbalTestCase
*
* @var \PDOException|\PHPUnit_Framework_MockObject_MockObject
*/
private $wrappedExceptionMock;
private $wrappedException;
protected function setUp()
{
......@@ -35,13 +35,11 @@ class PDOExceptionTest extends DbalTestCase
parent::setUp();
$this->wrappedExceptionMock = $this->getMockBuilder('\PDOException')
->setConstructorArgs(array(self::MESSAGE, self::SQLSTATE))
->getMock();
$this->wrappedException = new \PDOException(self::MESSAGE, self::SQLSTATE);
$this->wrappedExceptionMock->errorInfo = array(self::SQLSTATE, self::ERROR_CODE);
$this->wrappedException->errorInfo = array(self::SQLSTATE, self::ERROR_CODE);
$this->exception = new PDOException($this->wrappedExceptionMock);
$this->exception = new PDOException($this->wrappedException);
}
public function testReturnsCode()
......@@ -66,6 +64,6 @@ class PDOExceptionTest extends DbalTestCase
public function testOriginalExceptionIsInChain()
{
$this->assertSame($this->wrappedExceptionMock, $this->exception->getPrevious());
$this->assertSame($this->wrappedException, $this->exception->getPrevious());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment