diff --git a/.travis.yml b/.travis.yml index e8cb4dc..352be8b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,20 @@ language: php php: - - 5.3 - 5.4 - 5.5 - 5.6 - 7.0 - hhvm +sudo: false + +env: + - COMPOSER_FLAGS="" + - COMPOSER_FLAGS="--prefer-lowest" + before_script: - - composer update --no-interaction + - composer update --no-interaction ${COMPOSER_FLAGS} script: bin/phpunit diff --git a/composer.json b/composer.json index b838c4a..bcb9e0f 100644 --- a/composer.json +++ b/composer.json @@ -11,18 +11,18 @@ } ], "require": { - "php": ">=5.3.0", + "php": ">=5.4.0", "symfony/event-dispatcher" : "~2.2", - "symfony/property-access": "~2.2", + "symfony/property-access": "~2.3", "symfony/options-resolver": "~2.6", "fsi/reflection" : "0.9.*", "fsi/data-indexer" : "0.9.*" }, "require-dev": { - "doctrine/orm": "~2.2,>=2.2.3", - "doctrine/common": "~2.2,>=2.2.3", - "gedmo/doctrine-extensions": "2.3.*", - "symfony/form" : "~2.2", + "doctrine/orm": "~2.5", + "doctrine/common": "~2.5", + "gedmo/doctrine-extensions": "~2.3.10", + "symfony/form" : "~2.4", "symfony/doctrine-bridge": "~2.2", "symfony/security-csrf" : "~2.4", "symfony/routing" : "~2.2", @@ -41,7 +41,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.2 -dev" + "dev-master": "1.2-dev" } } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 0d4361c..35dd920 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -8,7 +8,6 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="tests/bootstrap.php" > diff --git a/tests/FSi/Component/DataGrid/Tests/Extension/Symfony/ColumnTypeExtension/FormExtensionTest.php b/tests/FSi/Component/DataGrid/Tests/Extension/Symfony/ColumnTypeExtension/FormExtensionTest.php index f307795..adecda1 100644 --- a/tests/FSi/Component/DataGrid/Tests/Extension/Symfony/ColumnTypeExtension/FormExtensionTest.php +++ b/tests/FSi/Component/DataGrid/Tests/Extension/Symfony/ColumnTypeExtension/FormExtensionTest.php @@ -36,6 +36,11 @@ protected function setUp() $this->markTestSkipped('Symfony Column Extension require Symfony\Component\Form\FormRegistry class.'); } + $entities = array( + new EntityCategory(1, 'category name 1'), + new EntityCategory(2, 'category name 2'), + ); + $configuration = $this->getMock('Doctrine\ORM\Configuration'); $objectManager = $this->getMock('Doctrine\ORM\EntityManagerInterface'); @@ -47,16 +52,12 @@ protected function setUp() ->method('getExpressionBuilder') ->will($this->returnValue(new Expr())); - $query = $this->getMockBuilder('Doctrine\ORM\AbstractQuery') - ->setMethods(array('execute', '_doExecute', 'getSql', 'setFirstResult', 'setMaxResults')) - ->setConstructorArgs(array($objectManager)) - ->getMock(); + $query = $this->getMock('Doctrine\ORM\AbstractQuery', + array('execute', '_doExecute', 'getSql', 'setFirstResult', 'setMaxResults'), + array($objectManager)); $query->expects($this->any()) ->method('execute') - ->will($this->returnValue(array( - new EntityCategory(1, 'category name 1'), - new EntityCategory(2, 'category name 2'), - ))); + ->will($this->returnValue($entities)); $query->expects($this->any()) ->method('setFirstResult') @@ -72,9 +73,6 @@ protected function setUp() ->will($this->returnValue($query)); $queryBuilder = new QueryBuilder($objectManager); -/* $queryBuilder->expects($this->any()) - ->method('getQuery') - ->will($this->returnValue($queryBuilder));*/ $entityClass = 'FSi\Component\DataGrid\Tests\Fixtures\EntityCategory'; $classMetadata = new ClassMetadata('FSi\Component\DataGrid\Tests\Fixtures\EntityCategory'); @@ -94,6 +92,9 @@ protected function setUp() ->method('createQueryBuilder') ->withAnyParameters() ->will($this->returnValue($queryBuilder)); + $repository->expects($this->any()) + ->method('findAll') + ->will($this->returnValue($entities)); $objectManager->expects($this->any()) ->method('getClassMetadata') diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index 58a3bd3..0000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ -