diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 2a2d4c951ec..6664512c92a 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -54,15 +54,22 @@ jobs: if: "${{ matrix.deps == 'low' }}" - name: "Run PHPUnit" - run: "vendor/bin/phpunit -c ci/github/phpunit/sqlite.xml" + run: "vendor/bin/phpunit -c ci/github/phpunit/sqlite.xml --coverage-clover=coverage-no-cache.xml" env: ENABLE_SECOND_LEVEL_CACHE: 0 - name: "Run PHPUnit with Second Level Cache" - run: "vendor/bin/phpunit -c ci/github/phpunit/sqlite.xml --exclude-group performance,non-cacheable,locking_functional" + run: "vendor/bin/phpunit -c ci/github/phpunit/sqlite.xml --exclude-group performance,non-cacheable,locking_functional --coverage-clover=coverage-cache.xml" env: ENABLE_SECOND_LEVEL_CACHE: 1 + - name: "Upload coverage file" + uses: "actions/upload-artifact@v2" + with: + name: "phpunit-sqlite-${{ matrix.deps }}-${{ matrix.php-version }}-coverage" + path: "coverage*.xml" + + phpunit-postgres: name: "PHPUnit with PostgreSQL" runs-on: "ubuntu-20.04" @@ -112,7 +119,14 @@ jobs: run: "composer update --no-interaction --no-progress --no-suggest" - name: "Run PHPUnit" - run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_pgsql.xml" + run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_pgsql.xml --coverage-clover=coverage.xml" + + - name: "Upload coverage file" + uses: "actions/upload-artifact@v2" + with: + name: "${{ github.job }}-${{ matrix.postgres-version }}-${{ matrix.php-version }}-coverage" + path: "coverage.xml" + phpunit-mariadb: name: "PHPUnit with MariaDB" @@ -167,7 +181,14 @@ jobs: run: "composer update --no-interaction --no-progress --no-suggest" - name: "Run PHPUnit" - run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml" + run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml" + + - name: "Upload coverage file" + uses: "actions/upload-artifact@v2" + with: + name: "${{ github.job }}-${{ matrix.mariadb-version }}-${{ matrix.extension }}-${{ matrix.php-version }}-coverage" + path: "coverage.xml" + phpunit-mysql: name: "PHPUnit with MySQL" @@ -222,11 +243,42 @@ jobs: run: "composer update --no-interaction --no-progress --no-suggest" - name: "Run PHPUnit" - run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml" + run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage-no-cache.xml" env: ENABLE_SECOND_LEVEL_CACHE: 0 - name: "Run PHPUnit with Second Level Cache" - run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --exclude-group performance,non-cacheable,locking_functional" + run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --exclude-group performance,non-cacheable,locking_functional --coverage-clover=coverage-no-cache.xml" env: ENABLE_SECOND_LEVEL_CACHE: 1 + + - name: "Upload coverage files" + uses: "actions/upload-artifact@v2" + with: + name: "${{ github.job }}-${{ matrix.mysql-version }}-${{ matrix.extension }}-${{ matrix.php-version }}-coverage" + path: "coverage*.xml" + + upload_coverage: + name: "Upload coverage to Codecov" + runs-on: "ubuntu-20.04" + needs: + - "phpunit-smoke-check" + - "phpunit-postgres" + - "phpunit-mariadb" + - "phpunit-mysql" + + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + with: + fetch-depth: 2 + + - name: "Download coverage files" + uses: "actions/download-artifact@v2" + with: + path: "reports" + + - name: "Upload to Codecov" + uses: "codecov/codecov-action@v1" + with: + directory: reports diff --git a/.gitignore b/.gitignore index 729e78aa480..5376ff24624 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ vendor/ /tests/Doctrine/Performance/history.db /.phpcs-cache composer.lock +/.phpunit.result.cache diff --git a/ci/github/phpunit/mysqli.xml b/ci/github/phpunit/mysqli.xml index 00b367117f8..e94fd135986 100644 --- a/ci/github/phpunit/mysqli.xml +++ b/ci/github/phpunit/mysqli.xml @@ -24,11 +24,11 @@ - - + + ../../../lib/Doctrine - - + + diff --git a/ci/github/phpunit/pdo_mysql.xml b/ci/github/phpunit/pdo_mysql.xml index bb4ac109d9a..4e7b131638a 100644 --- a/ci/github/phpunit/pdo_mysql.xml +++ b/ci/github/phpunit/pdo_mysql.xml @@ -24,11 +24,12 @@ - - + + ../../../lib/Doctrine - - + + + diff --git a/ci/github/phpunit/pdo_pgsql.xml b/ci/github/phpunit/pdo_pgsql.xml index cfa5a7c5430..b980fb94e0d 100644 --- a/ci/github/phpunit/pdo_pgsql.xml +++ b/ci/github/phpunit/pdo_pgsql.xml @@ -24,11 +24,11 @@ - - + + ../../../lib/Doctrine - - + + diff --git a/ci/github/phpunit/sqlite.xml b/ci/github/phpunit/sqlite.xml index 9fe63921127..edadb0c088e 100644 --- a/ci/github/phpunit/sqlite.xml +++ b/ci/github/phpunit/sqlite.xml @@ -18,11 +18,11 @@ - - + + ../../../lib/Doctrine - - + + diff --git a/composer.json b/composer.json index 5e0d9197a82..31cfc4f8cf1 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "require-dev": { "doctrine/coding-standard": "^6.0", "phpstan/phpstan": "^0.12.18", - "phpunit/phpunit": "^7.5", + "phpunit/phpunit": "^8.0", "symfony/yaml": "^3.4|^4.0|^5.0", "vimeo/psalm": "^3.11" }, diff --git a/tests/Doctrine/Tests/DbalFunctionalTestCase.php b/tests/Doctrine/Tests/DbalFunctionalTestCase.php index 0be58edf342..c566e0e1dde 100644 --- a/tests/Doctrine/Tests/DbalFunctionalTestCase.php +++ b/tests/Doctrine/Tests/DbalFunctionalTestCase.php @@ -25,10 +25,7 @@ protected function resetSharedConn() self::$_sharedConn = null; } - /** - * @return void - */ - protected function setUp() + protected function setUp() : void { if (isset($this->sharedFixture['conn'])) { $this->_conn = $this->sharedFixture['conn']; diff --git a/tests/Doctrine/Tests/Mapping/UnderscoreNamingStrategyTest.php b/tests/Doctrine/Tests/Mapping/UnderscoreNamingStrategyTest.php index 589dc7fd7e0..ed7a351c664 100644 --- a/tests/Doctrine/Tests/Mapping/UnderscoreNamingStrategyTest.php +++ b/tests/Doctrine/Tests/Mapping/UnderscoreNamingStrategyTest.php @@ -16,7 +16,7 @@ final class UnderscoreNamingStrategyTest extends TestCase /** @test */ public function checkDeprecationMessage() : void { - $this->expectDeprecationMessage('Creating Doctrine\ORM\Mapping\UnderscoreNamingStrategy without making it number aware is deprecated and will be removed in Doctrine ORM 3.0.'); + $this->expectDeprecationMessageSame('Creating Doctrine\ORM\Mapping\UnderscoreNamingStrategy without making it number aware is deprecated and will be removed in Doctrine ORM 3.0.'); new UnderscoreNamingStrategy(CASE_LOWER, false); } } diff --git a/tests/Doctrine/Tests/ORM/Cache/AbstractRegionTest.php b/tests/Doctrine/Tests/ORM/Cache/AbstractRegionTest.php index 665978f01d3..4126e316d04 100644 --- a/tests/Doctrine/Tests/ORM/Cache/AbstractRegionTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/AbstractRegionTest.php @@ -22,7 +22,7 @@ abstract class AbstractRegionTest extends OrmFunctionalTestCase */ protected $cache; - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Cache/CacheConfigTest.php b/tests/Doctrine/Tests/ORM/Cache/CacheConfigTest.php index 4c016df1fc7..e77eb8f3b37 100644 --- a/tests/Doctrine/Tests/ORM/Cache/CacheConfigTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/CacheConfigTest.php @@ -25,7 +25,7 @@ class CacheConfigTest extends DoctrineTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Cache/CacheLoggerChainTest.php b/tests/Doctrine/Tests/ORM/Cache/CacheLoggerChainTest.php index a070237a200..2c54b40071e 100644 --- a/tests/Doctrine/Tests/ORM/Cache/CacheLoggerChainTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/CacheLoggerChainTest.php @@ -25,7 +25,7 @@ class CacheLoggerChainTest extends DoctrineTestCase */ private $mock; - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Cache/DefaultCacheFactoryTest.php b/tests/Doctrine/Tests/ORM/Cache/DefaultCacheFactoryTest.php index 4ff2edc1cf9..b83fdff0520 100644 --- a/tests/Doctrine/Tests/ORM/Cache/DefaultCacheFactoryTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/DefaultCacheFactoryTest.php @@ -47,7 +47,7 @@ class DefaultCacheFactoryTest extends OrmTestCase */ private $regionsConfig; - protected function setUp() + protected function setUp() : void { $this->enableSecondLevelCache(); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Cache/DefaultCacheTest.php b/tests/Doctrine/Tests/ORM/Cache/DefaultCacheTest.php index cbc9d8e8b73..7d73e99a0cc 100644 --- a/tests/Doctrine/Tests/ORM/Cache/DefaultCacheTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/DefaultCacheTest.php @@ -28,7 +28,7 @@ class DefaultCacheTest extends OrmTestCase */ private $em; - protected function setUp() + protected function setUp() : void { parent::enableSecondLevelCache(); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Cache/DefaultCollectionHydratorTest.php b/tests/Doctrine/Tests/ORM/Cache/DefaultCollectionHydratorTest.php index f2a35b16a95..cff757d66ac 100644 --- a/tests/Doctrine/Tests/ORM/Cache/DefaultCollectionHydratorTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/DefaultCollectionHydratorTest.php @@ -24,7 +24,7 @@ class DefaultCollectionHydratorTest extends OrmFunctionalTestCase */ private $structure; - protected function setUp() + protected function setUp() : void { $this->enableSecondLevelCache(); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Cache/DefaultEntityHydratorTest.php b/tests/Doctrine/Tests/ORM/Cache/DefaultEntityHydratorTest.php index d58ab8a0527..ca1ad990570 100644 --- a/tests/Doctrine/Tests/ORM/Cache/DefaultEntityHydratorTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/DefaultEntityHydratorTest.php @@ -27,7 +27,7 @@ class DefaultEntityHydratorTest extends OrmTestCase */ private $em; - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Cache/DefaultQueryCacheTest.php b/tests/Doctrine/Tests/ORM/Cache/DefaultQueryCacheTest.php index ecfcc5207ff..59c23dbf730 100644 --- a/tests/Doctrine/Tests/ORM/Cache/DefaultQueryCacheTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/DefaultQueryCacheTest.php @@ -46,7 +46,7 @@ class DefaultQueryCacheTest extends OrmTestCase */ private $cacheFactory; - protected function setUp() + protected function setUp() : void { parent::setUp(); @@ -640,12 +640,10 @@ public function testGetAssociationValue() $this->assertCount(1, $attractions[1]); } - /** - * @expectedException Doctrine\ORM\Cache\CacheException - * @expectedExceptionMessage Second level cache does not support scalar results. - */ public function testScalarResultException() { + $this->expectException('Doctrine\ORM\Cache\CacheException'); + $this->expectExceptionMessage('Second level cache does not support scalar results.'); $result = []; $key = new QueryCacheKey('query.key1', 0); $rsm = new ResultSetMappingBuilder($this->em); @@ -655,12 +653,10 @@ public function testScalarResultException() $this->queryCache->put($key, $rsm, $result); } - /** - * @expectedException Doctrine\ORM\Cache\CacheException - * @expectedExceptionMessage Second level cache does not support multiple root entities. - */ public function testSupportMultipleRootEntitiesException() { + $this->expectException('Doctrine\ORM\Cache\CacheException'); + $this->expectExceptionMessage('Second level cache does not support multiple root entities.'); $result = []; $key = new QueryCacheKey('query.key1', 0); $rsm = new ResultSetMappingBuilder($this->em); @@ -671,12 +667,10 @@ public function testSupportMultipleRootEntitiesException() $this->queryCache->put($key, $rsm, $result); } - /** - * @expectedException Doctrine\ORM\Cache\CacheException - * @expectedExceptionMessage Entity "Doctrine\Tests\Models\Generic\BooleanModel" not configured as part of the second-level cache. - */ public function testNotCacheableEntityException() { + $this->expectException('Doctrine\ORM\Cache\CacheException'); + $this->expectExceptionMessage('Entity "Doctrine\Tests\Models\Generic\BooleanModel" not configured as part of the second-level cache.'); $result = []; $key = new QueryCacheKey('query.key1', 0); $rsm = new ResultSetMappingBuilder($this->em); diff --git a/tests/Doctrine/Tests/ORM/Cache/FileLockRegionTest.php b/tests/Doctrine/Tests/ORM/Cache/FileLockRegionTest.php index 1162f3c6aa6..f42b4f61c10 100644 --- a/tests/Doctrine/Tests/ORM/Cache/FileLockRegionTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/FileLockRegionTest.php @@ -30,7 +30,7 @@ class FileLockRegionTest extends AbstractRegionTest /** * {@inheritDoc} */ - public function tearDown() + public function tearDown() : void { $this->cleanTestDirectory($this->directory); } diff --git a/tests/Doctrine/Tests/ORM/Cache/Persister/Collection/AbstractCollectionPersisterTest.php b/tests/Doctrine/Tests/ORM/Cache/Persister/Collection/AbstractCollectionPersisterTest.php index fed92a39721..69bd7497f26 100644 --- a/tests/Doctrine/Tests/ORM/Cache/Persister/Collection/AbstractCollectionPersisterTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/Persister/Collection/AbstractCollectionPersisterTest.php @@ -74,7 +74,7 @@ abstract class AbstractCollectionPersisterTest extends OrmTestCase */ abstract protected function createPersister(EntityManager $em, CollectionPersister $persister, Region $region, array $mapping); - protected function setUp() + protected function setUp() : void { $this->getSharedSecondLevelCacheDriverImpl()->flushAll(); $this->enableSecondLevelCache(); diff --git a/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/AbstractEntityPersisterTest.php b/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/AbstractEntityPersisterTest.php index a0e3adbe51f..23c74027780 100644 --- a/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/AbstractEntityPersisterTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/AbstractEntityPersisterTest.php @@ -45,7 +45,7 @@ abstract class AbstractEntityPersisterTest extends OrmTestCase */ abstract protected function createPersister(EntityManager $em, EntityPersister $persister, Region $region, ClassMetadata $metadata); - protected function setUp() + protected function setUp() : void { $this->getSharedSecondLevelCacheDriverImpl()->flushAll(); $this->enableSecondLevelCache(); diff --git a/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/ReadOnlyCachedEntityPersisterTest.php b/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/ReadOnlyCachedEntityPersisterTest.php index 716ea15cbdd..2ab1e69cfbc 100644 --- a/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/ReadOnlyCachedEntityPersisterTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/ReadOnlyCachedEntityPersisterTest.php @@ -22,12 +22,10 @@ protected function createPersister(EntityManager $em, EntityPersister $persister return new ReadOnlyCachedEntityPersister($persister, $region, $em, $metadata); } - /** - * @expectedException Doctrine\ORM\Cache\CacheException - * @expectedExceptionMessage Cannot update a readonly entity "Doctrine\Tests\Models\Cache\Country" - */ public function testInvokeUpdate() { + $this->expectException('Doctrine\ORM\Cache\CacheException'); + $this->expectExceptionMessage('Cannot update a readonly entity "Doctrine\Tests\Models\Cache\Country"'); $persister = $this->createPersisterDefault(); $entity = new Country("Foo"); diff --git a/tests/Doctrine/Tests/ORM/Cache/StatisticsCacheLoggerTest.php b/tests/Doctrine/Tests/ORM/Cache/StatisticsCacheLoggerTest.php index e9f04f350ed..f38767ac349 100644 --- a/tests/Doctrine/Tests/ORM/Cache/StatisticsCacheLoggerTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/StatisticsCacheLoggerTest.php @@ -19,7 +19,7 @@ class StatisticsCacheLoggerTest extends DoctrineTestCase */ private $logger; - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/CommitOrderCalculatorTest.php b/tests/Doctrine/Tests/ORM/CommitOrderCalculatorTest.php index c967beb8b62..6b149cd2ced 100644 --- a/tests/Doctrine/Tests/ORM/CommitOrderCalculatorTest.php +++ b/tests/Doctrine/Tests/ORM/CommitOrderCalculatorTest.php @@ -17,7 +17,7 @@ class CommitOrderCalculatorTest extends OrmTestCase { private $_calc; - protected function setUp() + protected function setUp() : void { $this->_calc = new CommitOrderCalculator(); } @@ -98,7 +98,7 @@ public function testCommitOrdering3() ]; // We want to perform a strict comparison of the array - $this->assertContains($sorted, $correctOrders, '', false, true, true); + $this->assertContains($sorted, $correctOrders, '', false, true); } } diff --git a/tests/Doctrine/Tests/ORM/ConfigurationTest.php b/tests/Doctrine/Tests/ORM/ConfigurationTest.php index d2e839a780f..13096dcc15a 100644 --- a/tests/Doctrine/Tests/ORM/ConfigurationTest.php +++ b/tests/Doctrine/Tests/ORM/ConfigurationTest.php @@ -30,7 +30,7 @@ class ConfigurationTest extends TestCase */ private $configuration; - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->configuration = new Configuration(); diff --git a/tests/Doctrine/Tests/ORM/Decorator/EntityManagerDecoratorTest.php b/tests/Doctrine/Tests/ORM/Decorator/EntityManagerDecoratorTest.php index f3e309af655..cacf4b4ccec 100644 --- a/tests/Doctrine/Tests/ORM/Decorator/EntityManagerDecoratorTest.php +++ b/tests/Doctrine/Tests/ORM/Decorator/EntityManagerDecoratorTest.php @@ -39,7 +39,7 @@ public function ignoreDeprecationMessagesFromDoctrinePersistence() : void $this->ignoreDeprecationMessage('The Doctrine\Common\Persistence\ObjectManagerDecorator class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. Use \Doctrine\Persistence\ObjectManagerDecorator instead.'); } - public function setUp() + protected function setUp() : void { $this->wrapped = $this->createMock(EntityManagerInterface::class); } diff --git a/tests/Doctrine/Tests/ORM/EntityManagerTest.php b/tests/Doctrine/Tests/ORM/EntityManagerTest.php index 4886e78c657..e932ad82ea8 100644 --- a/tests/Doctrine/Tests/ORM/EntityManagerTest.php +++ b/tests/Doctrine/Tests/ORM/EntityManagerTest.php @@ -31,7 +31,7 @@ class EntityManagerTest extends OrmTestCase */ private $_em; - function setUp() + protected function setUp() : void { parent::setUp(); $this->_em = $this->_getTestEntityManager(); @@ -314,7 +314,7 @@ public function testDeprecatedClearWithArguments() : void $entity = new Country(456, 'United Kingdom'); $this->_em->persist($entity); - $this->expectDeprecationMessage('Calling Doctrine\ORM\EntityManager::clear() with any arguments to clear specific entities is deprecated and will not be supported in Doctrine ORM 3.0.'); + $this->expectDeprecationMessageSame('Calling Doctrine\ORM\EntityManager::clear() with any arguments to clear specific entities is deprecated and will not be supported in Doctrine ORM 3.0.'); $this->_em->clear(Country::class); } @@ -323,7 +323,7 @@ public function testDeprecatedFlushWithArguments() : void $entity = new Country(456, 'United Kingdom'); $this->_em->persist($entity); - $this->expectDeprecationMessage('Calling Doctrine\ORM\EntityManager::flush() with any arguments to flush specific entities is deprecated and will not be supported in Doctrine ORM 3.0.'); + $this->expectDeprecationMessageSame('Calling Doctrine\ORM\EntityManager::flush() with any arguments to flush specific entities is deprecated and will not be supported in Doctrine ORM 3.0.'); $this->_em->flush($entity); } @@ -332,7 +332,7 @@ public function testDeprecatedMerge() : void $entity = new Country(456, 'United Kingdom'); $this->_em->persist($entity); - $this->expectDeprecationMessage('Method Doctrine\ORM\EntityManager::merge() is deprecated and will be removed in Doctrine ORM 3.0.'); + $this->expectDeprecationMessageSame('Method Doctrine\ORM\EntityManager::merge() is deprecated and will be removed in Doctrine ORM 3.0.'); $this->_em->merge($entity); } @@ -341,7 +341,7 @@ public function testDeprecatedDetach() : void $entity = new Country(456, 'United Kingdom'); $this->_em->persist($entity); - $this->expectDeprecationMessage('Method Doctrine\ORM\EntityManager::detach() is deprecated and will be removed in Doctrine ORM 3.0.'); + $this->expectDeprecationMessageSame('Method Doctrine\ORM\EntityManager::detach() is deprecated and will be removed in Doctrine ORM 3.0.'); $this->_em->detach($entity); } @@ -351,7 +351,7 @@ public function testDeprecatedCopy() : void $this->_em->persist($entity); try { - $this->expectDeprecationMessage('Method Doctrine\ORM\EntityManager::copy() is deprecated and will be removed in Doctrine ORM 3.0.'); + $this->expectDeprecationMessageSame('Method Doctrine\ORM\EntityManager::copy() is deprecated and will be removed in Doctrine ORM 3.0.'); $this->_em->copy($entity); } catch (\BadMethodCallException $e) { // do nothing diff --git a/tests/Doctrine/Tests/ORM/Functional/AdvancedAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/AdvancedAssociationTest.php index e6714500cd5..140b2968bbf 100644 --- a/tests/Doctrine/Tests/ORM/Functional/AdvancedAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/AdvancedAssociationTest.php @@ -13,7 +13,8 @@ */ class AdvancedAssociationTest extends OrmFunctionalTestCase { - protected function setUp() { + protected function setUp() : void + { parent::setUp(); try { $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/AdvancedDqlQueryTest.php b/tests/Doctrine/Tests/ORM/Functional/AdvancedDqlQueryTest.php index a7c35412b52..ed6bf8b8009 100644 --- a/tests/Doctrine/Tests/ORM/Functional/AdvancedDqlQueryTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/AdvancedDqlQueryTest.php @@ -14,7 +14,7 @@ */ class AdvancedDqlQueryTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('company'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php b/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php index 7f19fa83010..e22612fd3bf 100644 --- a/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php @@ -22,7 +22,7 @@ class BasicFunctionalTest extends OrmFunctionalTestCase { use VerifyDeprecations; - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/CascadeRemoveOrderTest.php b/tests/Doctrine/Tests/ORM/Functional/CascadeRemoveOrderTest.php index 8908e51e009..da7f6bcc25f 100644 --- a/tests/Doctrine/Tests/ORM/Functional/CascadeRemoveOrderTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/CascadeRemoveOrderTest.php @@ -10,7 +10,7 @@ */ class CascadeRemoveOrderTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); @@ -22,7 +22,7 @@ protected function setUp() ); } - protected function tearDown() + protected function tearDown() : void { parent::tearDown(); diff --git a/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php b/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php index 4ece24fa773..4d92abd2440 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php @@ -21,7 +21,7 @@ */ class ClassTableInheritanceTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('company'); diff --git a/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest2.php b/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest2.php index 84949a6e3ed..5fac480bd31 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest2.php +++ b/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest2.php @@ -12,7 +12,7 @@ */ class ClassTableInheritanceTest2 extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/CompositePrimaryKeyTest.php b/tests/Doctrine/Tests/ORM/Functional/CompositePrimaryKeyTest.php index 03bde6ba7cb..cedd4bd6bff 100644 --- a/tests/Doctrine/Tests/ORM/Functional/CompositePrimaryKeyTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/CompositePrimaryKeyTest.php @@ -12,7 +12,7 @@ class CompositePrimaryKeyTest extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('navigation'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/CompositePrimaryKeyWithAssociationsTest.php b/tests/Doctrine/Tests/ORM/Functional/CompositePrimaryKeyWithAssociationsTest.php index 533f611d402..a335ed464fd 100644 --- a/tests/Doctrine/Tests/ORM/Functional/CompositePrimaryKeyWithAssociationsTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/CompositePrimaryKeyWithAssociationsTest.php @@ -9,7 +9,7 @@ class CompositePrimaryKeyWithAssociationsTest extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('geonames'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/CustomFunctionsTest.php b/tests/Doctrine/Tests/ORM/Functional/CustomFunctionsTest.php index 79668b8f2cc..0da3d7c2391 100644 --- a/tests/Doctrine/Tests/ORM/Functional/CustomFunctionsTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/CustomFunctionsTest.php @@ -15,7 +15,7 @@ class CustomFunctionsTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); diff --git a/tests/Doctrine/Tests/ORM/Functional/CustomIdObjectTypeTest.php b/tests/Doctrine/Tests/ORM/Functional/CustomIdObjectTypeTest.php index 08d89fa8ec2..a76a5d7116e 100644 --- a/tests/Doctrine/Tests/ORM/Functional/CustomIdObjectTypeTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/CustomIdObjectTypeTest.php @@ -11,7 +11,7 @@ class CustomIdObjectTypeTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { if (DBALType::hasType(CustomIdObjectType::NAME)) { DBALType::overrideType(CustomIdObjectType::NAME, CustomIdObjectType::class); diff --git a/tests/Doctrine/Tests/ORM/Functional/DatabaseDriverTest.php b/tests/Doctrine/Tests/ORM/Functional/DatabaseDriverTest.php index 5d08039e504..f0e09df5334 100644 --- a/tests/Doctrine/Tests/ORM/Functional/DatabaseDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/DatabaseDriverTest.php @@ -14,7 +14,7 @@ class DatabaseDriverTest extends DatabaseDriverTestCase */ protected $_sm = null; - public function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/DefaultValuesTest.php b/tests/Doctrine/Tests/ORM/Functional/DefaultValuesTest.php index 2797ba8337b..26a4f24f419 100644 --- a/tests/Doctrine/Tests/ORM/Functional/DefaultValuesTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/DefaultValuesTest.php @@ -11,7 +11,7 @@ */ class DefaultValuesTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/DetachedEntityTest.php b/tests/Doctrine/Tests/ORM/Functional/DetachedEntityTest.php index b1a98530713..abcef89a229 100644 --- a/tests/Doctrine/Tests/ORM/Functional/DetachedEntityTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/DetachedEntityTest.php @@ -21,7 +21,7 @@ class DetachedEntityTest extends OrmFunctionalTestCase { use VerifyDeprecations; - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/EntityListenersTest.php b/tests/Doctrine/Tests/ORM/Functional/EntityListenersTest.php index 4b066933ebf..a60b9abec9b 100644 --- a/tests/Doctrine/Tests/ORM/Functional/EntityListenersTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/EntityListenersTest.php @@ -20,7 +20,7 @@ class EntityListenersTest extends OrmFunctionalTestCase */ private $listener; - protected function setUp() + protected function setUp() : void { $this->useModelSet('company'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryCriteriaTest.php b/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryCriteriaTest.php index 700964b97da..fc901949c17 100644 --- a/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryCriteriaTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryCriteriaTest.php @@ -14,14 +14,14 @@ */ class EntityRepositoryCriteriaTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('generic'); $this->useModelSet('tweet'); parent::setUp(); } - public function tearDown() + public function tearDown() : void { if ($this->_em) { $this->_em->getConfiguration()->setEntityNamespaces([]); diff --git a/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php b/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php index 555eaff8bec..ce61310fcd7 100644 --- a/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php @@ -29,13 +29,13 @@ class EntityRepositoryTest extends OrmFunctionalTestCase { use VerifyDeprecations; - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); } - public function tearDown() + public function tearDown() : void { if ($this->_em) { $this->_em->getConfiguration()->setEntityNamespaces([]); @@ -306,18 +306,14 @@ public function testCountBy() $this->assertSame(2, $userCount); } - /** - * @expectedException \Doctrine\ORM\ORMException - */ public function testExceptionIsThrownWhenCallingFindByWithoutParameter() { + $this->expectException('Doctrine\ORM\ORMException'); $this->_em->getRepository(CmsUser::class) ->findByStatus(); } - /** - * @expectedException \Doctrine\ORM\ORMException - */ public function testExceptionIsThrownWhenUsingInvalidFieldName() { + $this->expectException('Doctrine\ORM\ORMException'); $this->_em->getRepository(CmsUser::class) ->findByThisFieldDoesNotExist('testvalue'); } @@ -645,11 +641,11 @@ public function testDefaultRepositoryClassName() /** * @group DDC-753 - * @expectedException Doctrine\ORM\ORMException - * @expectedExceptionMessage Invalid repository class 'Doctrine\Tests\Models\DDC753\DDC753InvalidRepository'. It must be a Doctrine\Persistence\ObjectRepository. */ public function testSetDefaultRepositoryInvalidClassError() { + $this->expectException('Doctrine\ORM\ORMException'); + $this->expectExceptionMessage('Invalid repository class \'Doctrine\Tests\Models\DDC753\DDC753InvalidRepository\'. It must be a Doctrine\Persistence\ObjectRepository.'); $this->assertEquals($this->_em->getConfiguration()->getDefaultRepositoryClassName(), EntityRepository::class); $this->_em->getConfiguration()->setDefaultRepositoryClassName(DDC753InvalidRepository::class); } @@ -683,12 +679,11 @@ public function testCanRetrieveRepositoryFromClassNameWithLeadingBackslash() /** * @group DDC-1376 - * - * @expectedException Doctrine\ORM\ORMException - * @expectedExceptionMessage You cannot search for the association field 'Doctrine\Tests\Models\CMS\CmsUser#address', because it is the inverse side of an association. */ public function testInvalidOrderByAssociation() { + $this->expectException('Doctrine\ORM\ORMException'); + $this->expectExceptionMessage('You cannot search for the association field \'Doctrine\Tests\Models\CMS\CmsUser#address\', because it is the inverse side of an association.'); $this->_em->getRepository(CmsUser::class) ->findBy(['status' => 'test'], ['address' => 'ASC']); } diff --git a/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php b/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php index cfd303fcf12..34040f7b67d 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php @@ -35,7 +35,7 @@ class ExtraLazyCollectionTest extends OrmFunctionalTestCase private $topic; private $phonenumber; - public function setUp() + protected function setUp() : void { $this->useModelSet('tweet'); $this->useModelSet('cms'); @@ -61,7 +61,7 @@ public function setUp() $this->loadFixture(); } - public function tearDown() + public function tearDown() : void { parent::tearDown(); diff --git a/tests/Doctrine/Tests/ORM/Functional/FlushEventTest.php b/tests/Doctrine/Tests/ORM/Functional/FlushEventTest.php index b9298e3dc09..1424d60af69 100644 --- a/tests/Doctrine/Tests/ORM/Functional/FlushEventTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/FlushEventTest.php @@ -15,7 +15,7 @@ */ class FlushEventTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/GH5988Test.php b/tests/Doctrine/Tests/ORM/Functional/GH5988Test.php index 928f432320d..f388b3d8bb3 100644 --- a/tests/Doctrine/Tests/ORM/Functional/GH5988Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/GH5988Test.php @@ -17,7 +17,7 @@ */ final class GH5988Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/HydrationCacheTest.php b/tests/Doctrine/Tests/ORM/Functional/HydrationCacheTest.php index dc84ac4ed1f..46a4870ce8b 100644 --- a/tests/Doctrine/Tests/ORM/Functional/HydrationCacheTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/HydrationCacheTest.php @@ -12,7 +12,7 @@ */ class HydrationCacheTest extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('cms'); diff --git a/tests/Doctrine/Tests/ORM/Functional/IdentityMapTest.php b/tests/Doctrine/Tests/ORM/Functional/IdentityMapTest.php index 15929ae270d..1ab9eb82516 100644 --- a/tests/Doctrine/Tests/ORM/Functional/IdentityMapTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/IdentityMapTest.php @@ -18,7 +18,7 @@ */ class IdentityMapTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/IndexByAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/IndexByAssociationTest.php index 289e55807f8..bbd49dbc817 100644 --- a/tests/Doctrine/Tests/ORM/Functional/IndexByAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/IndexByAssociationTest.php @@ -19,7 +19,7 @@ class IndexByAssociationTest extends OrmFunctionalTestCase private $bond; - public function setUp() + protected function setUp() : void { $this->useModelSet('stockexchange'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/JoinedTableCompositeKeyTest.php b/tests/Doctrine/Tests/ORM/Functional/JoinedTableCompositeKeyTest.php index ab5c394e020..c581fa51810 100644 --- a/tests/Doctrine/Tests/ORM/Functional/JoinedTableCompositeKeyTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/JoinedTableCompositeKeyTest.php @@ -7,17 +7,12 @@ class JoinedTableCompositeKeyTest extends OrmFunctionalTestCase { - - public function setUp() + protected function setUp() : void { $this->useModelSet('compositekeyinheritance'); parent::setUp(); - } - /** - * - */ public function testInsertWithCompositeKey() { $childEntity = new JoinedChildClass(); diff --git a/tests/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php b/tests/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php index e23095fe848..268070de4ad 100644 --- a/tests/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php @@ -11,7 +11,7 @@ class LifecycleCallbackTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); try { @@ -268,7 +268,7 @@ public function testCascadedEntitiesNotLoadedInPostLoadDuringIterationWithSimple break; } } - + /** * https://github.com/doctrine/orm/issues/6568 */ @@ -276,7 +276,7 @@ public function testPostLoadIsInvokedOnFetchJoinedEntities() { $entA = new LifecycleCallbackCascader(); $this->_em->persist($entA); - + $entB_1 = new LifecycleCallbackTestEntity(); $entB_2 = new LifecycleCallbackTestEntity(); @@ -496,7 +496,7 @@ public function doStuffOnPostLoad() { $this->postLoadCallbackInvoked = true; $this->postLoadEntitiesCount = count($this->entities); } - + public function getId() { return $this->id; } diff --git a/tests/Doctrine/Tests/ORM/Functional/Locking/GearmanLockTest.php b/tests/Doctrine/Tests/ORM/Functional/Locking/GearmanLockTest.php index e804a5c339e..5f58f5ea3e1 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Locking/GearmanLockTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/Locking/GearmanLockTest.php @@ -15,7 +15,7 @@ class GearmanLockTest extends OrmFunctionalTestCase private $maxRunTime = 0; private $articleId; - protected function setUp() + protected function setUp() : void { if (!class_exists('GearmanClient', false)) { $this->markTestSkipped('pecl/gearman is required for this test to run.'); diff --git a/tests/Doctrine/Tests/ORM/Functional/Locking/LockTest.php b/tests/Doctrine/Tests/ORM/Functional/Locking/LockTest.php index d515e95bff7..9c093379400 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Locking/LockTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/Locking/LockTest.php @@ -15,7 +15,7 @@ */ class LockTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Locking/OptimisticTest.php b/tests/Doctrine/Tests/ORM/Functional/Locking/OptimisticTest.php index 8b8113b6a66..4d8711c97e2 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Locking/OptimisticTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/Locking/OptimisticTest.php @@ -9,7 +9,7 @@ class OptimisticTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); @@ -120,7 +120,7 @@ public function testMultipleFlushesDoIncrementalUpdates() $this->_em->persist($test); $this->_em->flush(); - $this->assertInternalType('int', $test->getVersion()); + $this->assertIsInt($test->getVersion()); $this->assertEquals($i + 1, $test->getVersion()); } } @@ -134,7 +134,7 @@ public function testStandardInsertSetsInitialVersionValue() $this->_em->persist($test); $this->_em->flush(); - $this->assertInternalType('int', $test->getVersion()); + $this->assertIsInt($test->getVersion()); $this->assertEquals(1, $test->getVersion()); return $test; diff --git a/tests/Doctrine/Tests/ORM/Functional/ManyToManyBasicAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/ManyToManyBasicAssociationTest.php index 0436b2af762..bacacd567bb 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ManyToManyBasicAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ManyToManyBasicAssociationTest.php @@ -19,7 +19,7 @@ */ class ManyToManyBasicAssociationTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); @@ -268,7 +268,7 @@ public function testWorkWithDqlHydratedEmptyCollection() ->setParameter(1, $user->getId()) ->getSingleResult(); $this->assertEquals(0, count($newUser->groups)); - $this->assertInternalType('array', $newUser->groups->getMapping()); + $this->assertIsArray($newUser->groups->getMapping()); $newUser->addGroup($group); diff --git a/tests/Doctrine/Tests/ORM/Functional/ManyToManyBidirectionalAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/ManyToManyBidirectionalAssociationTest.php index 597e0f3c390..80e639aaf74 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ManyToManyBidirectionalAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ManyToManyBidirectionalAssociationTest.php @@ -21,7 +21,7 @@ class ManyToManyBidirectionalAssociationTest extends AbstractManyToManyAssociati private $firstCategory; private $secondCategory; - protected function setUp() + protected function setUp() : void { $this->useModelSet('ecommerce'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/ManyToManyEventTest.php b/tests/Doctrine/Tests/ORM/Functional/ManyToManyEventTest.php index 87283ec4bf1..adf36de71be 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ManyToManyEventTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ManyToManyEventTest.php @@ -19,7 +19,7 @@ class ManyToManyEventTest extends OrmFunctionalTestCase */ private $listener; - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/ManyToManySelfReferentialAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/ManyToManySelfReferentialAssociationTest.php index 7c15c83fc94..4663033ad57 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ManyToManySelfReferentialAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ManyToManySelfReferentialAssociationTest.php @@ -21,7 +21,7 @@ class ManyToManySelfReferentialAssociationTest extends AbstractManyToManyAssocia private $firstRelated; private $secondRelated; - protected function setUp() + protected function setUp() : void { $this->useModelSet('ecommerce'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/ManyToManyUnidirectionalAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/ManyToManyUnidirectionalAssociationTest.php index 20e31db00df..1c94b4b942c 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ManyToManyUnidirectionalAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ManyToManyUnidirectionalAssociationTest.php @@ -21,7 +21,7 @@ class ManyToManyUnidirectionalAssociationTest extends AbstractManyToManyAssociat private $firstCart; private $secondCart; - protected function setUp() + protected function setUp() : void { $this->useModelSet('ecommerce'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/ManyToOneOrphanRemovalTest.php b/tests/Doctrine/Tests/ORM/Functional/ManyToOneOrphanRemovalTest.php index 049edd8290f..2e16cbcbc6e 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ManyToOneOrphanRemovalTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ManyToOneOrphanRemovalTest.php @@ -23,7 +23,7 @@ class ManyToOneOrphanRemovalTest extends OrmFunctionalTestCase ] ]; - protected function setUp() + protected function setUp() : void { $this->useModelSet('ornemental_orphan_removal'); diff --git a/tests/Doctrine/Tests/ORM/Functional/MappedSuperclassTest.php b/tests/Doctrine/Tests/ORM/Functional/MappedSuperclassTest.php index 97c34bba335..40bf1b6039b 100644 --- a/tests/Doctrine/Tests/ORM/Functional/MappedSuperclassTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/MappedSuperclassTest.php @@ -14,7 +14,8 @@ */ class MappedSuperclassTest extends OrmFunctionalTestCase { - protected function setUp() { + protected function setUp() : void + { $this->useModelSet('directorytree'); parent::setUp(); } diff --git a/tests/Doctrine/Tests/ORM/Functional/MergeCompositeToOneKeyTest.php b/tests/Doctrine/Tests/ORM/Functional/MergeCompositeToOneKeyTest.php index 54a9bc833da..f7dcb33125a 100644 --- a/tests/Doctrine/Tests/ORM/Functional/MergeCompositeToOneKeyTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/MergeCompositeToOneKeyTest.php @@ -14,7 +14,7 @@ class MergeCompositeToOneKeyTest extends OrmFunctionalTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/MergeProxiesTest.php b/tests/Doctrine/Tests/ORM/Functional/MergeProxiesTest.php index e323a190711..92750299d23 100644 --- a/tests/Doctrine/Tests/ORM/Functional/MergeProxiesTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/MergeProxiesTest.php @@ -20,7 +20,7 @@ class MergeProxiesTest extends OrmFunctionalTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { $this->useModelSet('generic'); diff --git a/tests/Doctrine/Tests/ORM/Functional/MergeSharedEntitiesTest.php b/tests/Doctrine/Tests/ORM/Functional/MergeSharedEntitiesTest.php index 3e2937eda99..518565c9a37 100644 --- a/tests/Doctrine/Tests/ORM/Functional/MergeSharedEntitiesTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/MergeSharedEntitiesTest.php @@ -13,7 +13,7 @@ class MergeSharedEntitiesTest extends OrmFunctionalTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/MergeVersionedManyToOneTest.php b/tests/Doctrine/Tests/ORM/Functional/MergeVersionedManyToOneTest.php index 18e061a45e2..2993374db94 100644 --- a/tests/Doctrine/Tests/ORM/Functional/MergeVersionedManyToOneTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/MergeVersionedManyToOneTest.php @@ -14,7 +14,7 @@ class MergeVersionedManyToOneTest extends OrmFunctionalTestCase { use VerifyDeprecations; - protected function setUp() + protected function setUp() : void { $this->useModelSet('versioned_many_to_one'); diff --git a/tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php b/tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php index 31c19a1cd4c..d69c00109ee 100644 --- a/tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php @@ -30,7 +30,7 @@ class NativeQueryTest extends OrmFunctionalTestCase { private $platform = null; - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); $this->useModelSet('company'); @@ -341,11 +341,9 @@ public function testAbstractClassInSingleTableInheritanceSchemaWithRSMBuilderThr $rsm->addRootEntityFromClassMetadata(CompanyContract::class, 'c'); } - /** - * @expectedException \InvalidArgumentException - */ public function testRSMBuilderThrowsExceptionOnColumnConflict() { + $this->expectException('InvalidArgumentException'); $rsm = new ResultSetMappingBuilder($this->_em); $rsm->addRootEntityFromClassMetadata(CmsUser::class, 'u'); $rsm->addJoinedEntityFromClassMetadata(CmsAddress::class, 'a', 'u', 'address'); diff --git a/tests/Doctrine/Tests/ORM/Functional/NewOperatorTest.php b/tests/Doctrine/Tests/ORM/Functional/NewOperatorTest.php index 1422dcd9a2c..0a198b4085c 100644 --- a/tests/Doctrine/Tests/ORM/Functional/NewOperatorTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/NewOperatorTest.php @@ -21,7 +21,7 @@ class NewOperatorTest extends OrmFunctionalTestCase */ private $fixtures; - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); @@ -189,7 +189,7 @@ public function testShouldAssumeFromEntityNamespaceWhenNotGiven() $dql = " SELECT new CmsUserDTO(u.name, e.email, a.city) - FROM + FROM Doctrine\Tests\Models\CMS\CmsUser u JOIN u.email e @@ -1047,42 +1047,34 @@ public function testShouldSupportMultipleNewOperatorsAndMultipleScalarsWithAndWi $this->assertEquals($this->fixtures[2]->username,$result[2]['cmsUserUsername']); } - /** - * @expectedException Doctrine\ORM\Query\QueryException - * @expectedExceptionMessage [Semantical Error] line 0, col 11 near '\InvalidClass(u.name)': Error: Class "\InvalidClass" is not defined. - */ public function testInvalidClassException() { + $this->expectException('Doctrine\ORM\Query\QueryException'); + $this->expectExceptionMessage('[Semantical Error] line 0, col 11 near \'\InvalidClass(u.name)\': Error: Class "\InvalidClass" is not defined.'); $dql = "SELECT new \InvalidClass(u.name) FROM Doctrine\Tests\Models\CMS\CmsUser u"; $this->_em->createQuery($dql)->getResult(); } - /** - * @expectedException Doctrine\ORM\Query\QueryException - * @expectedExceptionMessage [Semantical Error] line 0, col 11 near '\stdClass(u.name)': Error: Class "\stdClass" has not a valid constructor. - */ public function testInvalidClassConstructorException() { + $this->expectException('Doctrine\ORM\Query\QueryException'); + $this->expectExceptionMessage('[Semantical Error] line 0, col 11 near \'\stdClass(u.name)\': Error: Class "\stdClass" has not a valid constructor.'); $dql = "SELECT new \stdClass(u.name) FROM Doctrine\Tests\Models\CMS\CmsUser u"; $this->_em->createQuery($dql)->getResult(); } - /** - * @expectedException Doctrine\ORM\Query\QueryException - * @expectedExceptionMessage [Semantical Error] line 0, col 11 near 'Doctrine\Tests\ORM\Functional\ClassWithTooMuchArgs(u.name)': Error: Number of arguments does not match with "Doctrine\Tests\ORM\Functional\ClassWithTooMuchArgs" constructor declaration. - */ public function testInvalidClassWithoutConstructorException() { + $this->expectException('Doctrine\ORM\Query\QueryException'); + $this->expectExceptionMessage('[Semantical Error] line 0, col 11 near \'Doctrine\Tests\ORM\Functional\ClassWithTooMuchArgs(u.name)\': Error: Number of arguments does not match with "Doctrine\Tests\ORM\Functional\ClassWithTooMuchArgs" constructor declaration.'); $dql = "SELECT new Doctrine\Tests\ORM\Functional\ClassWithTooMuchArgs(u.name) FROM Doctrine\Tests\Models\CMS\CmsUser u"; $this->_em->createQuery($dql)->getResult(); } - /** - * @expectedException Doctrine\ORM\Query\QueryException - * @expectedExceptionMessage [Semantical Error] line 0, col 11 near 'Doctrine\Tests\ORM\Functional\ClassWithPrivateConstructor(u.name)': Error: Class "Doctrine\Tests\ORM\Functional\ClassWithPrivateConstructor" can not be instantiated. - */ public function testClassCantBeInstantiatedException() { + $this->expectException('Doctrine\ORM\Query\QueryException'); + $this->expectExceptionMessage('[Semantical Error] line 0, col 11 near \'Doctrine\Tests\ORM\Functional\ClassWithPrivateConstructor(u.name)\': Error: Class "Doctrine\Tests\ORM\Functional\ClassWithPrivateConstructor" can not be instantiated.'); $dql = "SELECT new Doctrine\Tests\ORM\Functional\ClassWithPrivateConstructor(u.name) FROM Doctrine\Tests\Models\CMS\CmsUser u"; $this->_em->createQuery($dql)->getResult(); } diff --git a/tests/Doctrine/Tests/ORM/Functional/NotifyPolicyTest.php b/tests/Doctrine/Tests/ORM/Functional/NotifyPolicyTest.php index df23914b323..128ea1ff826 100644 --- a/tests/Doctrine/Tests/ORM/Functional/NotifyPolicyTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/NotifyPolicyTest.php @@ -14,7 +14,7 @@ */ class NotifyPolicyTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/OneToManyBidirectionalAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/OneToManyBidirectionalAssociationTest.php index 95309c60579..91f81a72dad 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OneToManyBidirectionalAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OneToManyBidirectionalAssociationTest.php @@ -18,7 +18,7 @@ class OneToManyBidirectionalAssociationTest extends OrmFunctionalTestCase private $firstFeature; private $secondFeature; - protected function setUp() + protected function setUp() : void { $this->useModelSet('ecommerce'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/OneToManyOrphanRemovalTest.php b/tests/Doctrine/Tests/ORM/Functional/OneToManyOrphanRemovalTest.php index da70672b6d2..ff75cb4fb2a 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OneToManyOrphanRemovalTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OneToManyOrphanRemovalTest.php @@ -13,7 +13,7 @@ class OneToManyOrphanRemovalTest extends OrmFunctionalTestCase { protected $userId; - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); diff --git a/tests/Doctrine/Tests/ORM/Functional/OneToManySelfReferentialAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/OneToManySelfReferentialAssociationTest.php index c9f42237d19..be85a103921 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OneToManySelfReferentialAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OneToManySelfReferentialAssociationTest.php @@ -16,7 +16,7 @@ class OneToManySelfReferentialAssociationTest extends OrmFunctionalTestCase private $firstChild; private $secondChild; - protected function setUp() + protected function setUp() : void { $this->useModelSet('ecommerce'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/OneToManyUnidirectionalAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/OneToManyUnidirectionalAssociationTest.php index c13a6fe9971..f521fb6dcb5 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OneToManyUnidirectionalAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OneToManyUnidirectionalAssociationTest.php @@ -14,7 +14,7 @@ class OneToManyUnidirectionalAssociationTest extends OrmFunctionalTestCase { protected $locations = []; - public function setUp() + protected function setUp() : void { $this->useModelSet('routing'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/OneToOneBidirectionalAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/OneToOneBidirectionalAssociationTest.php index c989e126c44..83691e886ee 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OneToOneBidirectionalAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OneToOneBidirectionalAssociationTest.php @@ -17,7 +17,7 @@ class OneToOneBidirectionalAssociationTest extends OrmFunctionalTestCase private $customer; private $cart; - protected function setUp() + protected function setUp() : void { $this->useModelSet('ecommerce'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/OneToOneEagerLoadingTest.php b/tests/Doctrine/Tests/ORM/Functional/OneToOneEagerLoadingTest.php index 5b4cdffdfe5..375242352ab 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OneToOneEagerLoadingTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OneToOneEagerLoadingTest.php @@ -11,7 +11,7 @@ */ class OneToOneEagerLoadingTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); $schemaTool = new SchemaTool($this->_em); diff --git a/tests/Doctrine/Tests/ORM/Functional/OneToOneInverseSideLoadAfterDqlQueryTest.php b/tests/Doctrine/Tests/ORM/Functional/OneToOneInverseSideLoadAfterDqlQueryTest.php index 85e518efa78..1ab31b7a3fb 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OneToOneInverseSideLoadAfterDqlQueryTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OneToOneInverseSideLoadAfterDqlQueryTest.php @@ -11,7 +11,7 @@ class OneToOneInverseSideLoadAfterDqlQueryTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/OneToOneOrphanRemovalTest.php b/tests/Doctrine/Tests/ORM/Functional/OneToOneOrphanRemovalTest.php index 09ef64e021f..d99acc34b02 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OneToOneOrphanRemovalTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OneToOneOrphanRemovalTest.php @@ -12,7 +12,7 @@ */ class OneToOneOrphanRemovalTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); diff --git a/tests/Doctrine/Tests/ORM/Functional/OneToOneSelfReferentialAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/OneToOneSelfReferentialAssociationTest.php index 0011e8c8c40..cf15e7d6e04 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OneToOneSelfReferentialAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OneToOneSelfReferentialAssociationTest.php @@ -20,7 +20,7 @@ class OneToOneSelfReferentialAssociationTest extends OrmFunctionalTestCase private $customer; private $mentor; - protected function setUp() + protected function setUp() : void { $this->useModelSet('ecommerce'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/OneToOneSingleTableInheritanceTest.php b/tests/Doctrine/Tests/ORM/Functional/OneToOneSingleTableInheritanceTest.php index 3e9a291f00b..b20ab908210 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OneToOneSingleTableInheritanceTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OneToOneSingleTableInheritanceTest.php @@ -10,7 +10,7 @@ class OneToOneSingleTableInheritanceTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/OneToOneUnidirectionalAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/OneToOneUnidirectionalAssociationTest.php index 797a38517d0..2d967167a8d 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OneToOneUnidirectionalAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OneToOneUnidirectionalAssociationTest.php @@ -18,7 +18,7 @@ class OneToOneUnidirectionalAssociationTest extends OrmFunctionalTestCase private $product; private $shipping; - protected function setUp() + protected function setUp() : void { $this->useModelSet('ecommerce'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/OrderedCollectionTest.php b/tests/Doctrine/Tests/ORM/Functional/OrderedCollectionTest.php index aa4fb1da0f6..00de0cd05a8 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OrderedCollectionTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OrderedCollectionTest.php @@ -12,7 +12,7 @@ class OrderedCollectionTest extends OrmFunctionalTestCase { protected $locations = []; - public function setUp() + protected function setUp() : void { $this->useModelSet('routing'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/OrderedJoinedTableInheritanceCollectionTest.php b/tests/Doctrine/Tests/ORM/Functional/OrderedJoinedTableInheritanceCollectionTest.php index 30531bae98d..166187af973 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OrderedJoinedTableInheritanceCollectionTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OrderedJoinedTableInheritanceCollectionTest.php @@ -12,7 +12,7 @@ */ class OrderedJoinedTableInheritanceCollectionTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php b/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php index 9f200cb8e9d..36959743ee5 100644 --- a/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php @@ -26,7 +26,7 @@ */ class PaginationTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); $this->useModelSet('pagination'); @@ -711,14 +711,16 @@ public function testCountQueryStripsParametersInSelect() public function testPaginationWithSubSelectOrderByExpression($useOutputWalker, $fetchJoinCollection) { $query = $this->_em->createQuery( - "SELECT u, + <<<'SQL' + SELECT u, ( SELECT MAX(a.version) - FROM Doctrine\\Tests\\Models\\CMS\\CmsArticle a + FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.user = u ) AS HIDDEN max_version - FROM Doctrine\\Tests\\Models\\CMS\\CmsUser u - ORDER BY max_version DESC" + FROM Doctrine\Tests\Models\CMS\CmsUser u + ORDER BY max_version DESC +SQL ); $paginator = new Paginator($query, $fetchJoinCollection); diff --git a/tests/Doctrine/Tests/ORM/Functional/PersistentCollectionCriteriaTest.php b/tests/Doctrine/Tests/ORM/Functional/PersistentCollectionCriteriaTest.php index 4e0f442d84a..aea051e2c92 100644 --- a/tests/Doctrine/Tests/ORM/Functional/PersistentCollectionCriteriaTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/PersistentCollectionCriteriaTest.php @@ -16,14 +16,14 @@ */ class PersistentCollectionCriteriaTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('tweet'); $this->useModelSet('quote'); parent::setUp(); } - public function tearDown() + public function tearDown() : void { if ($this->_em) { $this->_em->getConfiguration()->setEntityNamespaces([]); diff --git a/tests/Doctrine/Tests/ORM/Functional/PersistentCollectionTest.php b/tests/Doctrine/Tests/ORM/Functional/PersistentCollectionTest.php index b1751455f34..1c9601e8b69 100644 --- a/tests/Doctrine/Tests/ORM/Functional/PersistentCollectionTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/PersistentCollectionTest.php @@ -9,7 +9,7 @@ class PersistentCollectionTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/PersistentObjectTest.php b/tests/Doctrine/Tests/ORM/Functional/PersistentObjectTest.php index 0fd2b47455c..cfbeb5041f8 100644 --- a/tests/Doctrine/Tests/ORM/Functional/PersistentObjectTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/PersistentObjectTest.php @@ -13,7 +13,7 @@ */ class PersistentObjectTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/PostFlushEventTest.php b/tests/Doctrine/Tests/ORM/Functional/PostFlushEventTest.php index 12e2c40809d..c2506bafbe4 100644 --- a/tests/Doctrine/Tests/ORM/Functional/PostFlushEventTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/PostFlushEventTest.php @@ -19,7 +19,7 @@ class PostFlushEventTest extends OrmFunctionalTestCase */ private $listener; - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/PostLoadEventTest.php b/tests/Doctrine/Tests/ORM/Functional/PostLoadEventTest.php index 02a08666673..cfd7db235ef 100644 --- a/tests/Doctrine/Tests/ORM/Functional/PostLoadEventTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/PostLoadEventTest.php @@ -25,7 +25,7 @@ class PostLoadEventTest extends OrmFunctionalTestCase /** * {@inheritdoc} */ - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); diff --git a/tests/Doctrine/Tests/ORM/Functional/ProxiesLikeEntitiesTest.php b/tests/Doctrine/Tests/ORM/Functional/ProxiesLikeEntitiesTest.php index e88733d7db5..ca29a0495cf 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ProxiesLikeEntitiesTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ProxiesLikeEntitiesTest.php @@ -27,7 +27,7 @@ class ProxiesLikeEntitiesTest extends OrmFunctionalTestCase */ protected $user; - protected function setUp() + protected function setUp() : void { parent::setUp(); try { @@ -134,7 +134,7 @@ public function testFindWithProxyName() $this->_em->clear(); } - protected function tearDown() + protected function tearDown() : void { $this->_em->createQuery('DELETE FROM Doctrine\Tests\Models\CMS\CmsUser u')->execute(); } diff --git a/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php b/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php index a307ad13786..2124f9846e0 100644 --- a/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php @@ -21,7 +21,7 @@ class QueryCacheTest extends OrmFunctionalTestCase */ private $cacheDataReflection; - protected function setUp() + protected function setUp() : void { $this->cacheDataReflection = new \ReflectionProperty(ArrayCache::class, "data"); $this->cacheDataReflection->setAccessible(true); diff --git a/tests/Doctrine/Tests/ORM/Functional/QueryDqlFunctionTest.php b/tests/Doctrine/Tests/ORM/Functional/QueryDqlFunctionTest.php index 50008eb6932..ec326e4f83c 100644 --- a/tests/Doctrine/Tests/ORM/Functional/QueryDqlFunctionTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/QueryDqlFunctionTest.php @@ -14,7 +14,7 @@ */ class QueryDqlFunctionTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('company'); parent::setUp(); @@ -279,12 +279,12 @@ public function testDateDiff() $query = $this->_em->createQuery("SELECT DATE_DIFF(CURRENT_TIMESTAMP(), DATE_ADD(CURRENT_TIMESTAMP(), 10, 'day')) AS diff FROM Doctrine\Tests\Models\Company\CompanyManager m"); $arg = $query->getArrayResult(); - $this->assertEquals(-10, $arg[0]['diff'], "Should be roughly -10 (or -9)", 1); + $this->assertEqualsWithDelta(-10, $arg[0]['diff'], 1, 'Should be roughly -10 (or -9)'); $query = $this->_em->createQuery("SELECT DATE_DIFF(DATE_ADD(CURRENT_TIMESTAMP(), 10, 'day'), CURRENT_TIMESTAMP()) AS diff FROM Doctrine\Tests\Models\Company\CompanyManager m"); $arg = $query->getArrayResult(); - $this->assertEquals(10, $arg[0]['diff'], "Should be roughly 10 (or 9)", 1); + $this->assertEqualsWithDelta(10, $arg[0]['diff'], 1, 'Should be roughly 10 (or 9)'); } /** @@ -309,11 +309,11 @@ public function testDateAdd(string $unit, int $amount, int $delta = 0) : void self::assertArrayHasKey('now', $result); self::assertArrayHasKey('add', $result); - self::assertEquals( + self::assertEqualsWithDelta( (new \DateTimeImmutable($result['now']))->modify(sprintf('+%d %s', $amount, $unit)), new \DateTimeImmutable($result['add']), - '', - $delta + $delta, + '' ); } @@ -339,11 +339,11 @@ public function testDateSub(string $unit, int $amount, int $delta = 0) : void self::assertArrayHasKey('now', $result); self::assertArrayHasKey('sub', $result); - self::assertEquals( + self::assertEqualsWithDelta( (new \DateTimeImmutable($result['now']))->modify(sprintf('-%d %s', $amount, $unit)), new \DateTimeImmutable($result['sub']), - '', - $delta + $delta, + '' ); } diff --git a/tests/Doctrine/Tests/ORM/Functional/QueryTest.php b/tests/Doctrine/Tests/ORM/Functional/QueryTest.php index f25cd33faaa..ae9d2f8b09f 100644 --- a/tests/Doctrine/Tests/ORM/Functional/QueryTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/QueryTest.php @@ -23,7 +23,7 @@ */ class QueryTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); @@ -315,38 +315,30 @@ public function testIterateResultClearEveryCycle() $this->_em->flush(); } - /** - * @expectedException \Doctrine\ORM\Query\QueryException - */ public function testIterateResult_FetchJoinedCollection_ThrowsException() { + $this->expectException('Doctrine\ORM\Query\QueryException'); $query = $this->_em->createQuery("SELECT u, a FROM ' . CmsUser::class . ' u JOIN u.articles a"); $articles = $query->iterate(); } - /** - * @expectedException Doctrine\ORM\NoResultException - */ public function testGetSingleResultThrowsExceptionOnNoResult() { + $this->expectException('Doctrine\ORM\NoResultException'); $this->_em->createQuery("select a from Doctrine\Tests\Models\CMS\CmsArticle a") ->getSingleResult(); } - /** - * @expectedException Doctrine\ORM\NoResultException - */ public function testGetSingleScalarResultThrowsExceptionOnNoResult() { + $this->expectException('Doctrine\ORM\NoResultException'); $this->_em->createQuery("select a from Doctrine\Tests\Models\CMS\CmsArticle a") ->getSingleScalarResult(); } - /** - * @expectedException Doctrine\ORM\NonUniqueResultException - */ public function testGetSingleScalarResultThrowsExceptionOnNonUniqueResult() { + $this->expectException('Doctrine\ORM\NonUniqueResultException'); $user = new CmsUser; $user->name = 'Guilherme'; $user->username = 'gblanco'; diff --git a/tests/Doctrine/Tests/ORM/Functional/ReadOnlyTest.php b/tests/Doctrine/Tests/ORM/Functional/ReadOnlyTest.php index a664a4df252..570a56d6251 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ReadOnlyTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ReadOnlyTest.php @@ -11,7 +11,7 @@ */ class ReadOnlyTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/ReferenceProxyTest.php b/tests/Doctrine/Tests/ORM/Functional/ReferenceProxyTest.php index d2e0e827253..a59903054c5 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ReferenceProxyTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ReferenceProxyTest.php @@ -17,7 +17,7 @@ */ class ReferenceProxyTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('ecommerce'); $this->useModelSet('company'); diff --git a/tests/Doctrine/Tests/ORM/Functional/ResultCacheTest.php b/tests/Doctrine/Tests/ORM/Functional/ResultCacheTest.php index cffe07fe7d2..b74b82cbdae 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ResultCacheTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ResultCacheTest.php @@ -22,7 +22,8 @@ class ResultCacheTest extends OrmFunctionalTestCase */ private $cacheDataReflection; - protected function setUp() { + protected function setUp() : void + { $this->cacheDataReflection = new \ReflectionProperty(ArrayCache::class, "data"); $this->cacheDataReflection->setAccessible(true); $this->useModelSet('cms'); diff --git a/tests/Doctrine/Tests/ORM/Functional/SQLFilterTest.php b/tests/Doctrine/Tests/ORM/Functional/SQLFilterTest.php index c35036b6e3c..35b5459fc6b 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SQLFilterTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SQLFilterTest.php @@ -39,14 +39,14 @@ class SQLFilterTest extends OrmFunctionalTestCase private $managerId, $managerId2, $contractId1, $contractId2; private $organizationId, $eventId1, $eventId2; - public function setUp() + protected function setUp() : void { $this->useModelSet('cms'); $this->useModelSet('company'); parent::setUp(); } - public function tearDown() + public function tearDown() : void { parent::tearDown(); diff --git a/tests/Doctrine/Tests/ORM/Functional/SchemaTool/CompanySchemaTest.php b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/CompanySchemaTest.php index 1a36591cf53..614c7c29a96 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SchemaTool/CompanySchemaTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/CompanySchemaTest.php @@ -13,7 +13,7 @@ */ class CompanySchemaTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('company'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/SchemaTool/DBAL483Test.php b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/DBAL483Test.php index 8a874c478a7..9fe5c602f7a 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SchemaTool/DBAL483Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/DBAL483Test.php @@ -7,7 +7,7 @@ class DBAL483Test extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/SchemaTool/DDC214Test.php b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/DDC214Test.php index 8c414b119a3..d38fcb51b45 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SchemaTool/DDC214Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/DDC214Test.php @@ -15,7 +15,7 @@ class DDC214Test extends OrmFunctionalTestCase private $classes = []; private $schemaTool = null; - public function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/SchemaTool/MySqlSchemaToolTest.php b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/MySqlSchemaToolTest.php index 829b3aa2b85..3a1578e28cb 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SchemaTool/MySqlSchemaToolTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/MySqlSchemaToolTest.php @@ -10,7 +10,8 @@ class MySqlSchemaToolTest extends OrmFunctionalTestCase { - protected function setUp() { + protected function setUp() : void + { parent::setUp(); if ($this->_em->getConnection()->getDatabasePlatform()->getName() !== 'mysql') { $this->markTestSkipped('The ' . __CLASS__ .' requires the use of mysql.'); diff --git a/tests/Doctrine/Tests/ORM/Functional/SchemaTool/PostgreSqlSchemaToolTest.php b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/PostgreSqlSchemaToolTest.php index 5ebf84c5644..b1ba7d10f3a 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SchemaTool/PostgreSqlSchemaToolTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/PostgreSqlSchemaToolTest.php @@ -8,7 +8,7 @@ class PostgreSqlSchemaToolTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/SchemaValidatorTest.php b/tests/Doctrine/Tests/ORM/Functional/SchemaValidatorTest.php index 5ab0f07c07e..14032646b2b 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SchemaValidatorTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SchemaValidatorTest.php @@ -16,7 +16,7 @@ */ class SchemaValidatorTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->registerType(CustomIdObjectType::class); $this->registerType(UpperCaseStringType::class); diff --git a/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheAbstractTest.php b/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheAbstractTest.php index becf7edbb4d..e6ed7d79740 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheAbstractTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheAbstractTest.php @@ -43,7 +43,7 @@ abstract class SecondLevelCacheAbstractTest extends OrmFunctionalTestCase */ protected $cache; - protected function setUp() + protected function setUp() : void { $this->enableSecondLevelCache(); diff --git a/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheCompositePrimaryKeyWithAssociationsTest.php b/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheCompositePrimaryKeyWithAssociationsTest.php index 8af09c9bf0d..8cfb8245fe1 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheCompositePrimaryKeyWithAssociationsTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheCompositePrimaryKeyWithAssociationsTest.php @@ -15,7 +15,7 @@ class SecondLevelCacheCompositePrimaryKeyWithAssociationsTest extends OrmFunctio */ protected $cache; - public function setUp() + protected function setUp() : void { $this->enableSecondLevelCache(); $this->useModelSet('geonames'); diff --git a/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheConcurrentTest.php b/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheConcurrentTest.php index 0f4ca383284..cafd16a872f 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheConcurrentTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheConcurrentTest.php @@ -26,7 +26,7 @@ class SecondLevelCacheConcurrentTest extends SecondLevelCacheAbstractTest private $countryMetadata; - protected function setUp() + protected function setUp() : void { $this->enableSecondLevelCache(); parent::setUp(); @@ -45,7 +45,7 @@ protected function setUp() $this->_em->getMetadataFactory()->setMetadataFor(Country::class, $countryMetadata); } - protected function tearDown() + protected function tearDown() : void { parent::tearDown(); diff --git a/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheExtraLazyCollectionTest.php b/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheExtraLazyCollectionTest.php index 75499ac302c..9f438d6bc26 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheExtraLazyCollectionTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheExtraLazyCollectionTest.php @@ -12,7 +12,7 @@ */ class SecondLevelCacheExtraLazyCollectionTest extends SecondLevelCacheAbstractTest { - public function setUp() + protected function setUp() : void { parent::setUp(); @@ -23,7 +23,7 @@ public function setUp() $targetEntity->associationMappings['travels']['fetch'] = ClassMetadata::FETCH_EXTRA_LAZY; } - public function tearDown() + public function tearDown() : void { parent::tearDown(); diff --git a/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheManyToManyTest.php b/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheManyToManyTest.php index efe19f3e074..35bed89efbb 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheManyToManyTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheManyToManyTest.php @@ -186,12 +186,10 @@ public function testStoreManyToManyAssociationWhitCascade() $this->assertEquals($queryCount1, $this->getCurrentQueryCount()); } - /** - * @expectedException \Doctrine\ORM\Cache\CacheException - * @expectedExceptionMessage Cannot update a readonly collection "Doctrine\Tests\Models\Cache\Travel#visitedCities - */ public function testReadOnlyCollection() { + $this->expectException('Doctrine\ORM\Cache\CacheException'); + $this->expectExceptionMessage('Cannot update a readonly collection "Doctrine\Tests\Models\Cache\Travel#visitedCities'); $this->evictRegions(); $this->loadFixturesCountries(); diff --git a/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheQueryCacheTest.php b/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheQueryCacheTest.php index 56188ade6c0..5e7ca59f3d6 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheQueryCacheTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheQueryCacheTest.php @@ -1085,12 +1085,10 @@ public function testHintClearEntityRegionDeleteStatement() $this->assertFalse($this->cache->containsEntity(Country::class, $this->countries[1]->getId())); } - /** - * @expectedException \Doctrine\ORM\Cache\CacheException - * @expectedExceptionMessage Second level cache does not support partial entities. - */ public function testCacheablePartialQueryException() { + $this->expectException('Doctrine\ORM\Cache\CacheException'); + $this->expectExceptionMessage('Second level cache does not support partial entities.'); $this->evictRegions(); $this->loadFixturesCountries(); @@ -1099,12 +1097,10 @@ public function testCacheablePartialQueryException() ->getResult(); } - /** - * @expectedException \Doctrine\ORM\Cache\CacheException - * @expectedExceptionMessage Second level cache does not support partial entities. - */ public function testCacheableForcePartialLoadHintQueryException() { + $this->expectException('Doctrine\ORM\Cache\CacheException'); + $this->expectExceptionMessage('Second level cache does not support partial entities.'); $this->evictRegions(); $this->loadFixturesCountries(); @@ -1114,23 +1110,19 @@ public function testCacheableForcePartialLoadHintQueryException() ->getResult(); } - /** - * @expectedException \Doctrine\ORM\Cache\CacheException - * @expectedExceptionMessage Second-level cache query supports only select statements. - */ public function testNonCacheableQueryDeleteStatementException() { + $this->expectException('Doctrine\ORM\Cache\CacheException'); + $this->expectExceptionMessage('Second-level cache query supports only select statements.'); $this->_em->createQuery("DELETE Doctrine\Tests\Models\Cache\Country u WHERE u.id = 4") ->setCacheable(true) ->getResult(); } - /** - * @expectedException \Doctrine\ORM\Cache\CacheException - * @expectedExceptionMessage Second-level cache query supports only select statements. - */ public function testNonCacheableQueryUpdateStatementException() { + $this->expectException('Doctrine\ORM\Cache\CacheException'); + $this->expectExceptionMessage('Second-level cache query supports only select statements.'); $this->_em->createQuery("UPDATE Doctrine\Tests\Models\Cache\Country u SET u.name = 'foo' WHERE u.id = 4") ->setCacheable(true) ->getResult(); diff --git a/tests/Doctrine/Tests/ORM/Functional/SequenceEmulatedIdentityStrategyTest.php b/tests/Doctrine/Tests/ORM/Functional/SequenceEmulatedIdentityStrategyTest.php index d425936f5bd..03b764c4aa6 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SequenceEmulatedIdentityStrategyTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SequenceEmulatedIdentityStrategyTest.php @@ -10,7 +10,7 @@ class SequenceEmulatedIdentityStrategyTest extends OrmFunctionalTestCase /** * {@inheritdoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); @@ -32,7 +32,7 @@ protected function setUp() /** * {@inheritdoc} */ - protected function tearDown() + protected function tearDown() : void { parent::tearDown(); diff --git a/tests/Doctrine/Tests/ORM/Functional/SequenceGeneratorTest.php b/tests/Doctrine/Tests/ORM/Functional/SequenceGeneratorTest.php index 290984f3584..f313d7162ee 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SequenceGeneratorTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SequenceGeneratorTest.php @@ -10,7 +10,7 @@ */ class SequenceGeneratorTest extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/SingleTableCompositeKeyTest.php b/tests/Doctrine/Tests/ORM/Functional/SingleTableCompositeKeyTest.php index 091c79f5412..c61290bae35 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SingleTableCompositeKeyTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SingleTableCompositeKeyTest.php @@ -7,17 +7,12 @@ class SingleTableCompositeKeyTest extends OrmFunctionalTestCase { - - public function setUp() + protected function setUp() : void { $this->useModelSet('compositekeyinheritance'); parent::setUp(); - } - /** - * - */ public function testInsertWithCompositeKey() { $childEntity = new SingleChildClass(); diff --git a/tests/Doctrine/Tests/ORM/Functional/SingleTableInheritanceTest.php b/tests/Doctrine/Tests/ORM/Functional/SingleTableInheritanceTest.php index 5bafffd790f..3ef2f03ac3f 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SingleTableInheritanceTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SingleTableInheritanceTest.php @@ -21,7 +21,7 @@ class SingleTableInheritanceTest extends OrmFunctionalTestCase private $flex; private $ultra; - public function setUp() + protected function setUp() : void { $this->useModelSet('company'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/StandardEntityPersisterTest.php b/tests/Doctrine/Tests/ORM/Functional/StandardEntityPersisterTest.php index bef1f768212..f2c0472ec33 100644 --- a/tests/Doctrine/Tests/ORM/Functional/StandardEntityPersisterTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/StandardEntityPersisterTest.php @@ -15,7 +15,7 @@ */ class StandardEntityPersisterTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('ecommerce'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1040Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1040Test.php index 988e8ba99d2..0312bec549a 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1040Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1040Test.php @@ -11,7 +11,7 @@ */ class DDC1040Test extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1041Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1041Test.php index ed27ed10044..fcb6fce1be8 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1041Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1041Test.php @@ -10,7 +10,7 @@ */ class DDC1041Test extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('company'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1043Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1043Test.php index 9b35eb006c2..faeda3c141f 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1043Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1043Test.php @@ -10,7 +10,7 @@ */ class DDC1043Test extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1113Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1113Test.php index 324e8481219..8b8c6f2d581 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1113Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1113Test.php @@ -8,7 +8,7 @@ */ class DDC1113Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1129Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1129Test.php index 81c95010298..480d2303781 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1129Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1129Test.php @@ -9,7 +9,7 @@ */ class DDC1129Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1163Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1163Test.php index f287034925a..32715075a88 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1163Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1163Test.php @@ -9,7 +9,7 @@ */ class DDC1163Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); //$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC117Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC117Test.php index f1685d60941..53cca994671 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC117Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC117Test.php @@ -24,7 +24,7 @@ class DDC117Test extends \Doctrine\Tests\OrmFunctionalTestCase private $translation; private $articleDetails; - protected function setUp() + protected function setUp() : void { $this->useModelSet('ddc117'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1181Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1181Test.php index 564e046e7d3..55cff4c0272 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1181Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1181Test.php @@ -6,7 +6,7 @@ class DDC1181Test extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1193Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1193Test.php index f4d98cb23a4..93044ae912d 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1193Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1193Test.php @@ -6,7 +6,7 @@ class DDC1193Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); //$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1209Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1209Test.php index 6c54da296be..76b22e80b5e 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1209Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1209Test.php @@ -6,7 +6,7 @@ class DDC1209Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1225Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1225Test.php index 1bfd6b91e15..7669f68337f 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1225Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1225Test.php @@ -7,7 +7,7 @@ */ class DDC1225Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1228Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1228Test.php index b4de087a359..9cde55d64e8 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1228Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1228Test.php @@ -8,7 +8,7 @@ */ class DDC1228Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1238Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1238Test.php index 00c621eeeef..f90de56f826 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1238Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1238Test.php @@ -7,7 +7,7 @@ */ class DDC1238Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1250Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1250Test.php index a09b1761fea..6de949d0e91 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1250Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1250Test.php @@ -7,7 +7,7 @@ */ class DDC1250Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1276Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1276Test.php index d340746863d..62b9d718a3d 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1276Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1276Test.php @@ -13,7 +13,7 @@ class DDC1276Test extends \Doctrine\Tests\OrmFunctionalTestCase { use VerifyDeprecations; - public function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1300Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1300Test.php index 4f0038b1c89..71559da6b58 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1300Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1300Test.php @@ -7,7 +7,7 @@ */ class DDC1300Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1301Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1301Test.php index 785b22187ed..1fed1daf8a2 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1301Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1301Test.php @@ -15,7 +15,7 @@ class DDC1301Test extends \Doctrine\Tests\OrmFunctionalTestCase { private $userId; - public function setUp() + protected function setUp() : void { $this->useModelSet('legacy'); parent::setUp(); @@ -28,7 +28,7 @@ public function setUp() $this->loadFixture(); } - public function tearDown() + public function tearDown() : void { parent::tearDown(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1306Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1306Test.php index 03c761a959c..f5ca357bcce 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1306Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1306Test.php @@ -11,7 +11,7 @@ */ class DDC1306Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('cms'); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1335Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1335Test.php index dd475559472..17f412ab26a 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1335Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1335Test.php @@ -7,7 +7,7 @@ */ class DDC1335Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1383Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1383Test.php index ca75f905508..8720ab6a950 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1383Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1383Test.php @@ -11,7 +11,7 @@ class DDC1383Test extends \Doctrine\Tests\OrmFunctionalTestCase { use VerifyDeprecations; - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1392Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1392Test.php index b872e413b50..5d6dd660728 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1392Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1392Test.php @@ -12,7 +12,7 @@ class DDC1392Test extends \Doctrine\Tests\OrmFunctionalTestCase { use VerifyDeprecations; - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1400Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1400Test.php index 1248fe8412d..0f0a41aa9ba 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1400Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1400Test.php @@ -7,7 +7,7 @@ */ class DDC1400Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1404Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1404Test.php index b3a1a939d21..419225ed149 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1404Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1404Test.php @@ -7,8 +7,7 @@ */ class DDC1404Test extends \Doctrine\Tests\OrmFunctionalTestCase { - - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1430Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1430Test.php index 6b08a832675..138eeb7e59f 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1430Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1430Test.php @@ -7,8 +7,7 @@ */ class DDC1430Test extends \Doctrine\Tests\OrmFunctionalTestCase { - - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1436Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1436Test.php index 9ffa497cd4d..8c44942b51a 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1436Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1436Test.php @@ -7,7 +7,7 @@ */ class DDC1436Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC144Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC144Test.php index 3866c588db0..56a48919ea7 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC144Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC144Test.php @@ -6,7 +6,8 @@ class DDC144Test extends OrmFunctionalTestCase { - protected function setUp() { + protected function setUp() : void + { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1452Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1452Test.php index 7e7ecc4f841..59d97360509 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1452Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1452Test.php @@ -12,7 +12,7 @@ */ class DDC1452Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1454Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1454Test.php index f10065cd887..93de4f0a168 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1454Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1454Test.php @@ -9,7 +9,7 @@ */ class DDC1454Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1458Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1458Test.php index 72d79cd432f..ef2b5599722 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1458Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1458Test.php @@ -6,7 +6,7 @@ class DDC1258Test extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1461Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1461Test.php index da7100d683e..c0aaf1afc90 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1461Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1461Test.php @@ -7,7 +7,7 @@ */ class DDC1461Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1509Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1509Test.php index a2f9c1904a9..8d8f3add744 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1509Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1509Test.php @@ -11,7 +11,7 @@ class DDC1509Test extends \Doctrine\Tests\OrmFunctionalTestCase { use VerifyDeprecations; - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1514Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1514Test.php index 1fc8a06efad..25e32602a6a 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1514Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1514Test.php @@ -9,7 +9,7 @@ */ class DDC1514Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1515Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1515Test.php index 294ae87388f..300413eb7fc 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1515Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1515Test.php @@ -8,7 +8,7 @@ */ class DDC1515Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1526Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1526Test.php index 7a76e3fb938..605f9412b60 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1526Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1526Test.php @@ -7,7 +7,7 @@ */ class DDC1526Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1545Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1545Test.php index 20ebe424c5c..00df9327bc2 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1545Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1545Test.php @@ -16,7 +16,7 @@ class DDC1545Test extends \Doctrine\Tests\OrmFunctionalTestCase private $user2Id; - public function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1548Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1548Test.php index 6628586cc91..31fa6f19338 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1548Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1548Test.php @@ -7,7 +7,7 @@ */ class DDC1548Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1594Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1594Test.php index 00cd70a3c09..f6be23a6af6 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1594Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1594Test.php @@ -12,7 +12,7 @@ class DDC1594Test extends \Doctrine\Tests\OrmFunctionalTestCase { use VerifyDeprecations; - public function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1595Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1595Test.php index 5f0e128b5c0..57601c6d65a 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1595Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1595Test.php @@ -9,7 +9,7 @@ */ class DDC1595Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC163Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC163Test.php index cea515ce3ec..9cb8e755302 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC163Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC163Test.php @@ -6,7 +6,7 @@ class DDC163Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('company'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1643Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1643Test.php index fda16824621..4d82d152d64 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1643Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1643Test.php @@ -12,7 +12,7 @@ class DDC1643Test extends \Doctrine\Tests\OrmFunctionalTestCase private $user1; private $user2; - public function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1654Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1654Test.php index a5a620f63da..c6c332bc65e 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1654Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1654Test.php @@ -7,7 +7,7 @@ */ class DDC1654Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); $this->setUpEntitySchema( @@ -18,7 +18,7 @@ public function setUp() ); } - public function tearDown() + public function tearDown() : void { $conn = static::$_sharedConn; $conn->executeUpdate('DELETE FROM ddc1654post_ddc1654comment'); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1655Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1655Test.php index a63d3635fe5..f5996be3ecd 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1655Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1655Test.php @@ -9,7 +9,7 @@ */ class DDC1655Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1666Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1666Test.php index e664e537c3d..6e359ddd70b 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1666Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1666Test.php @@ -10,7 +10,7 @@ */ class DDC1666Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1685Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1685Test.php index b2cbf513abb..c93f059169d 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1685Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1685Test.php @@ -12,7 +12,7 @@ class DDC1685Test extends \Doctrine\Tests\OrmFunctionalTestCase { private $paginator; - protected function setUp() + protected function setUp() : void { $this->useModelSet('ddc117'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC168Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC168Test.php index ddaa83d80eb..87647d397f6 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC168Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC168Test.php @@ -8,7 +8,8 @@ class DDC168Test extends \Doctrine\Tests\OrmFunctionalTestCase { protected $oldMetadata; - protected function setUp() { + protected function setUp() : void + { $this->useModelSet('company'); parent::setUp(); @@ -19,7 +20,7 @@ protected function setUp() { $this->_em->getMetadataFactory()->setMetadataFor(CompanyEmployee::class, $metadata); } - public function tearDown() + public function tearDown() : void { $this->_em->getMetadataFactory()->setMetadataFor(CompanyEmployee::class, $this->oldMetadata); parent::tearDown(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1690Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1690Test.php index dc5feb9833d..f86bcb2c02d 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1690Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1690Test.php @@ -8,7 +8,8 @@ class DDC1690Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() { + protected function setUp() : void + { parent::setUp(); try { $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1707Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1707Test.php index 54b52a57bd1..9e2c9f94185 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1707Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1707Test.php @@ -10,7 +10,7 @@ */ class DDC1707Test extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1719Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1719Test.php index b3784ff8a7c..33e71e07865 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1719Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1719Test.php @@ -7,7 +7,7 @@ */ class DDC1719Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); @@ -18,7 +18,7 @@ protected function setUp() ); } - protected function tearDown() + protected function tearDown() : void { parent::tearDown(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1734Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1734Test.php index 64199eb07c0..9df2ea1f21c 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1734Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1734Test.php @@ -13,7 +13,7 @@ class DDC1734Test extends \Doctrine\Tests\OrmFunctionalTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1778Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1778Test.php index 09623f13535..f838fefd907 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1778Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1778Test.php @@ -13,7 +13,7 @@ class DDC1778Test extends \Doctrine\Tests\OrmFunctionalTestCase private $user; private $phone; - public function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1787Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1787Test.php index 17f28658a5d..027a13a383b 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1787Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1787Test.php @@ -7,7 +7,7 @@ */ class DDC1787Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1884Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1884Test.php index c1c723bbf0d..958100ecacf 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1884Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1884Test.php @@ -12,7 +12,7 @@ */ class DDC1884Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('taxi'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1918Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1918Test.php index 4b0c7eb9151..92c12d60b97 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1918Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1918Test.php @@ -11,7 +11,7 @@ */ class DDC1918Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1995Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1995Test.php index 8bb975a05b3..e4643969a14 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1995Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1995Test.php @@ -10,7 +10,7 @@ */ class DDC1995Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('company'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC199Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC199Test.php index 2fb3acd33bd..c40e09a1d48 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC199Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC199Test.php @@ -6,7 +6,7 @@ class DDC199Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2012Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2012Test.php index 3882408081e..13adca23e34 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2012Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2012Test.php @@ -11,7 +11,7 @@ */ class DDC2012Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2074Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2074Test.php index 0456adc50e9..d5fc39b957b 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2074Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2074Test.php @@ -16,7 +16,7 @@ */ class DDC2074Test extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('ecommerce'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2084Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2084Test.php index eadbc1caf9d..8b342743842 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2084Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2084Test.php @@ -7,7 +7,7 @@ */ class DDC2084Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); @@ -49,12 +49,10 @@ public function testIssue() $this->assertEquals('Foo', $e->getMyEntity2()->getValue()); } - /** - * @expectedException \Doctrine\ORM\ORMInvalidArgumentException - * @expectedExceptionMessage Binding entities to query parameters only allowed for entities that have an identifier. - */ public function testinvalidIdentifierBindingEntityException() { + $this->expectException('Doctrine\ORM\ORMInvalidArgumentException'); + $this->expectExceptionMessage('Binding entities to query parameters only allowed for entities that have an identifier.'); $this->_em->find(__NAMESPACE__ . '\DDC2084\MyEntity1', new DDC2084\MyEntity2('Foo')); } } diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2090Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2090Test.php index 174fee2b288..1051751aa35 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2090Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2090Test.php @@ -10,7 +10,7 @@ */ class DDC2090Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('company'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2106Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2106Test.php index 99b2ade0f0b..53ce73e9ed2 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2106Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2106Test.php @@ -9,7 +9,7 @@ */ class DDC2106Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC211Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC211Test.php index 9ac27f3cf94..f217afbb064 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC211Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC211Test.php @@ -6,7 +6,7 @@ class DDC211Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2175Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2175Test.php index d6b3c603b8f..532033c1fe8 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2175Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2175Test.php @@ -7,7 +7,7 @@ */ class DDC2175Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2214Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2214Test.php index 87101fff1da..d180fa2b30b 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2214Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2214Test.php @@ -13,7 +13,7 @@ */ class DDC2214Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2224Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2224Test.php index 3529fa35640..f6bc715eeb6 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2224Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2224Test.php @@ -12,7 +12,7 @@ */ class DDC2224Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public static function setUpBeforeClass() + public static function setUpBeforeClass() : void { \Doctrine\DBAL\Types\Type::addType('DDC2224Type', DDC2224Type::class); } diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2230Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2230Test.php index 3fd6ea49d98..6a9488050fa 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2230Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2230Test.php @@ -16,7 +16,7 @@ class DDC2230Test extends OrmFunctionalTestCase { use VerifyDeprecations; - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2231Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2231Test.php index dcca1360e1a..8b5c458b7c4 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2231Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2231Test.php @@ -12,7 +12,7 @@ */ class DDC2231Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2252Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2252Test.php index e4b60196622..9a5e456c9fe 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2252Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2252Test.php @@ -14,7 +14,7 @@ class DDC2252Test extends \Doctrine\Tests\OrmFunctionalTestCase private $membership; private $privileges = []; - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2256Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2256Test.php index 02281a5e3a0..c38f7d645fc 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2256Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2256Test.php @@ -10,7 +10,7 @@ */ class DDC2256Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2306Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2306Test.php index 24807db029a..baed97f1406 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2306Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2306Test.php @@ -13,7 +13,7 @@ class DDC2306Test extends \Doctrine\Tests\OrmFunctionalTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2346Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2346Test.php index a1cac08eaf3..0cdd4607b94 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2346Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2346Test.php @@ -18,7 +18,7 @@ class DDC2346Test extends \Doctrine\Tests\OrmFunctionalTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2350Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2350Test.php index 1d3a4117ad0..5998538c05c 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2350Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2350Test.php @@ -10,7 +10,7 @@ */ class DDC2350Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC237Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC237Test.php index eac219c7280..3dad06a4868 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC237Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC237Test.php @@ -6,7 +6,7 @@ class DDC237Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2409Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2409Test.php index aa44bbaee6b..04e1544e893 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2409Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2409Test.php @@ -14,7 +14,7 @@ class DDC2409Test extends \Doctrine\Tests\OrmFunctionalTestCase { use VerifyDeprecations; - public function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2415Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2415Test.php index fb1f0ec273a..950af6c593c 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2415Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2415Test.php @@ -12,7 +12,7 @@ */ class DDC2415Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2494Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2494Test.php index 4aa30e95046..ffa9295e904 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2494Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2494Test.php @@ -11,7 +11,7 @@ */ class DDC2494Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); @@ -56,13 +56,13 @@ public function testIssue() $this->assertArrayHasKey('convertToPHPValue', DDC2494TinyIntType::$calls); $this->assertCount(1, DDC2494TinyIntType::$calls['convertToPHPValue']); - $this->assertInternalType('integer', $item->getCurrency()->getId()); + $this->assertIsInt($item->getCurrency()->getId()); $this->assertCount(1, DDC2494TinyIntType::$calls['convertToPHPValue']); $this->assertFalse($item->getCurrency()->__isInitialized()); $this->assertEquals($queryCount, $this->getCurrentQueryCount()); - $this->assertInternalType('integer', $item->getCurrency()->getTemp()); + $this->assertIsInt($item->getCurrency()->getTemp()); $this->assertCount(3, DDC2494TinyIntType::$calls['convertToPHPValue']); $this->assertTrue($item->getCurrency()->__isInitialized()); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2519Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2519Test.php index cc12d044dc0..3789d04a7b8 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2519Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2519Test.php @@ -13,7 +13,7 @@ class DDC2519Test extends \Doctrine\Tests\OrmFunctionalTestCase { private $userId; - public function setUp() + protected function setUp() : void { $this->useModelSet('legacy'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2575Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2575Test.php index e3652e55c04..0e6b1a1b33f 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2575Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2575Test.php @@ -11,7 +11,7 @@ class DDC2575Test extends \Doctrine\Tests\OrmFunctionalTestCase private $aEntities = []; private $bEntities = []; - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2579Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2579Test.php index e7ba77759f4..67d4712b090 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2579Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2579Test.php @@ -11,7 +11,7 @@ */ class DDC2579Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC258Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC258Test.php index fb7ce673e3e..8f654987958 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC258Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC258Test.php @@ -6,7 +6,7 @@ class DDC258Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2655Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2655Test.php index 8a2dc166a84..59ef5d31f83 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2655Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2655Test.php @@ -9,7 +9,7 @@ */ class DDC2655Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2660Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2660Test.php index 46380f754b2..e6e3f4c4de3 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2660Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2660Test.php @@ -12,7 +12,7 @@ class DDC2660Test extends \Doctrine\Tests\OrmFunctionalTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2692Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2692Test.php index 1e9f05e4768..c88ef9ac053 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2692Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2692Test.php @@ -13,7 +13,7 @@ class DDC2692Test extends \Doctrine\Tests\OrmFunctionalTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2759Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2759Test.php index 10d3e68ae91..f76778629d7 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2759Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2759Test.php @@ -10,7 +10,7 @@ class DDC2759Test extends \Doctrine\Tests\OrmFunctionalTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2775Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2775Test.php index b84024f048d..62d8d5fa7cf 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2775Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2775Test.php @@ -11,7 +11,7 @@ */ class DDC2775Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2780Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2780Test.php index 5539dfbbe5c..2fd0f2dd0f5 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2780Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2780Test.php @@ -12,9 +12,9 @@ class DDC2780Test extends \Doctrine\Tests\OrmFunctionalTestCase /** * {@inheritDoc} */ - protected function setup() + protected function setUp() : void { - parent::setup(); + parent::setUp(); $this->_schemaTool->createSchema( [ diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2790Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2790Test.php index 0f3efab262c..b14c098ff6d 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2790Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2790Test.php @@ -14,7 +14,7 @@ class DDC2790Test extends \Doctrine\Tests\OrmFunctionalTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC279Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC279Test.php index f09e2e68ccd..278a3b47acc 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC279Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC279Test.php @@ -4,7 +4,7 @@ class DDC279Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2825Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2825Test.php index 7aeba002a0a..5060ec34a7e 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2825Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2825Test.php @@ -16,7 +16,7 @@ class DDC2825Test extends \Doctrine\Tests\OrmFunctionalTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2862Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2862Test.php index c4b2fb227bf..0a4fcbd8e1c 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2862Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2862Test.php @@ -10,7 +10,7 @@ */ class DDC2862Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->enableSecondLevelCache(); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2895Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2895Test.php index 397c7acd380..fdebb43a6fb 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2895Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2895Test.php @@ -9,7 +9,7 @@ */ class DDC2895Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2931Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2931Test.php index 927856a1c6e..b4b92e3198b 100755 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2931Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2931Test.php @@ -9,7 +9,7 @@ */ class DDC2931Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2943Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2943Test.php index 553bc98f528..823110cdaef 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2943Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2943Test.php @@ -12,7 +12,7 @@ */ class DDC2943Test extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->enableSecondLevelCache(); $this->useModelSet('cache'); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2984Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2984Test.php index e21ac82dc87..191da80f729 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2984Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2984Test.php @@ -12,7 +12,7 @@ */ class DDC2984Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3042Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3042Test.php index 940989bb713..5b783df8407 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3042Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3042Test.php @@ -9,7 +9,7 @@ */ class DDC3042Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3068Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3068Test.php index 90a3f3ed80e..61d892b4c40 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3068Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3068Test.php @@ -16,7 +16,7 @@ class DDC3068Test extends \Doctrine\Tests\OrmFunctionalTestCase private $foo; private $merc; - protected function setUp() + protected function setUp() : void { $this->useModelSet('taxi'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC309Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC309Test.php index 15454b48269..557aa1106fc 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC309Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC309Test.php @@ -6,7 +6,7 @@ class DDC309Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3123Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3123Test.php index 515aa9febc7..64b055e5a31 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3123Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3123Test.php @@ -3,14 +3,16 @@ namespace Doctrine\Tests\ORM\Functional\Ticket; use Doctrine\ORM\Events; +use Doctrine\ORM\UnitOfWork; use Doctrine\Tests\Models\CMS\CmsUser; +use ReflectionClass; /** * @group DDC-3123 */ class DDC3123Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); @@ -36,7 +38,13 @@ public function testIssue() ->expects($this->once()) ->method(Events::postFlush) ->will($this->returnCallback(function () use ($uow, $test) { - $test->assertAttributeEmpty('extraUpdates', $uow, 'ExtraUpdates are reset before postFlush'); + $class = new ReflectionClass(UnitOfWork::class); + $property = $class->getProperty('extraUpdates'); + $property->setAccessible(true); + $test->assertEmpty( + $property->getValue($uow), + 'ExtraUpdates are reset before postFlush' + ); })); $this->_em->getEventManager()->addEventListener(Events::postFlush, $listener); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3160Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3160Test.php index c0ed69dd0e4..1eae53f4773 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3160Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3160Test.php @@ -14,7 +14,8 @@ */ class DDC3160Test extends OrmFunctionalTestCase { - protected function setUp() { + protected function setUp() : void + { $this->useModelSet('cms'); parent::setUp(); } diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3170Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3170Test.php index 45a49b7a6d0..b24f977c8cf 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3170Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3170Test.php @@ -13,7 +13,7 @@ class DDC3170Test extends \Doctrine\Tests\OrmFunctionalTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3192Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3192Test.php index 1262bce4521..ae142776285 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3192Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3192Test.php @@ -12,7 +12,7 @@ */ class DDC3192Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3223Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3223Test.php index 0f98adca1fa..813af9a9fa1 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3223Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3223Test.php @@ -11,7 +11,7 @@ */ class DDC3223Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3303Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3303Test.php index b40f99ff9d6..61515be80a4 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3303Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3303Test.php @@ -5,7 +5,7 @@ class DDC3303Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC331Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC331Test.php index 5ec8ad730ae..45cac50f8a4 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC331Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC331Test.php @@ -9,7 +9,8 @@ */ class DDC331Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() { + protected function setUp() : void + { $this->useModelSet('company'); parent::setUp(); } diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3330Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3330Test.php index a03c3172cfd..5af4d0669b4 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3330Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3330Test.php @@ -12,7 +12,7 @@ */ class DDC3330Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3346Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3346Test.php index 3865767604e..eeafa12beac 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3346Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3346Test.php @@ -10,7 +10,7 @@ */ class DDC3346Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('ddc3346'); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC345Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC345Test.php index 20b4236c304..e570f1e3a8e 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC345Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC345Test.php @@ -4,7 +4,7 @@ class DDC345Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); //$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC353Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC353Test.php index dcb782bd4f8..cdc780b9513 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC353Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC353Test.php @@ -6,7 +6,7 @@ class DDC353Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3597Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3597Test.php index 6d59fd6f70c..89c76810e82 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3597Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3597Test.php @@ -5,13 +5,15 @@ use Doctrine\Tests\Models\DDC3597\DDC3597Image; use Doctrine\Tests\Models\DDC3597\DDC3597Media; use Doctrine\Tests\Models\DDC3597\DDC3597Root; +use Doctrine\Tests\OrmFunctionalTestCase; /** * @group DDC-117 */ -class DDC3597Test extends \Doctrine\Tests\OrmFunctionalTestCase { - - protected function setUp() { +class DDC3597Test extends OrmFunctionalTestCase +{ + protected function setUp() : void + { parent::setUp(); $this->_schemaTool->createSchema( [ diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3634Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3634Test.php index 01f42bb930f..2dccf237b31 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3634Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3634Test.php @@ -11,9 +11,10 @@ /** * @group DDC-3634 */ -class DDC3634Test extends OrmFunctionalTestCase { - - protected function setUp() { +class DDC3634Test extends OrmFunctionalTestCase +{ + protected function setUp() : void + { parent::setUp(); $metadata = $this->_em->getClassMetadata(DDC3634Entity::class); @@ -57,7 +58,7 @@ public function testSavesIntegerAutoGeneratedValueAsString() $this->_em->persist($entity); $this->_em->flush(); - $this->assertInternalType('string', $entity->id); + $this->assertIsString($entity->id); } public function testSavesIntegerAutoGeneratedValueAsStringWithJoinedInheritance() @@ -67,7 +68,7 @@ public function testSavesIntegerAutoGeneratedValueAsStringWithJoinedInheritance( $this->_em->persist($entity); $this->_em->flush(); - $this->assertInternalType('string', $entity->id); + $this->assertIsString($entity->id); } } diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3644Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3644Test.php index 968c44d721b..6c667664835 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3644Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3644Test.php @@ -12,7 +12,7 @@ */ class DDC3644Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3699Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3699Test.php index 8d3607112e2..f36c19254ed 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3699Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3699Test.php @@ -12,7 +12,7 @@ class DDC3597Test extends \Doctrine\Tests\OrmFunctionalTestCase { use VerifyDeprecations; - protected function setUp() + protected function setUp() : void { $this->useModelSet('ddc3699'); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3719Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3719Test.php index f5f60c0b0d3..803367b8d83 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3719Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3719Test.php @@ -12,7 +12,7 @@ */ class DDC3719Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('company'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC371Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC371Test.php index 3fe5c4b80d3..d306676629a 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC371Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC371Test.php @@ -9,7 +9,7 @@ */ class DDC371Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); //$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3785Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3785Test.php index 984cda551ba..6b1dd59fb54 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3785Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3785Test.php @@ -8,7 +8,7 @@ class DDC3785Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC381Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC381Test.php index bbfd6974e21..4bfe606529f 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC381Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC381Test.php @@ -4,7 +4,7 @@ class DDC381Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3967Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3967Test.php index 72a9cfe168a..36dc82250c4 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3967Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3967Test.php @@ -7,7 +7,7 @@ class DDC3967Test extends SecondLevelCacheAbstractTest { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC422Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC422Test.php index 6ace5e74943..dc4b31669e7 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC422Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC422Test.php @@ -6,7 +6,7 @@ class DDC422Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); //$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC425Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC425Test.php index 8d91119a200..9c5ea5cda69 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC425Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC425Test.php @@ -5,7 +5,7 @@ class DDC425Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC440Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC440Test.php index 30d2ca6b9cd..aff0b0567e3 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC440Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC440Test.php @@ -4,8 +4,7 @@ class DDC440Test extends \Doctrine\Tests\OrmFunctionalTestCase { - - protected function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC444Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC444Test.php index 41d7e1270ec..9607d22de72 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC444Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC444Test.php @@ -4,7 +4,7 @@ class DDC444Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); //$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC448Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC448Test.php index 31e03e33732..7d0ddd3b57e 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC448Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC448Test.php @@ -6,7 +6,7 @@ class DDC448Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC493Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC493Test.php index 536a8b49b52..4fa82abccf6 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC493Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC493Test.php @@ -4,7 +4,7 @@ class DDC493Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC501Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC501Test.php index 14c8be412cb..1aca0a39adf 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC501Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC501Test.php @@ -22,7 +22,7 @@ class DDC501Test extends OrmFunctionalTestCase { use VerifyDeprecations; - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC512Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC512Test.php index 6f3c3cfb01b..9e4f80bfa10 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC512Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC512Test.php @@ -6,7 +6,7 @@ class DDC512Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC513Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC513Test.php index 800c442a398..13255382a0b 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC513Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC513Test.php @@ -4,7 +4,7 @@ class DDC513Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC518Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC518Test.php index 64749876b8c..864c5eb3b6f 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC518Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC518Test.php @@ -8,7 +8,7 @@ class DDC518Test extends \Doctrine\Tests\OrmFunctionalTestCase { use VerifyDeprecations; - public function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC522Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC522Test.php index dc6fa208179..58e8a69145a 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC522Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC522Test.php @@ -10,7 +10,7 @@ */ class DDC522Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC531Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC531Test.php index 33d88c6be1f..77ea2024bf4 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC531Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC531Test.php @@ -6,7 +6,7 @@ class DDC531Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC5684Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC5684Test.php index e525ae1342b..5b14cd06860 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC5684Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC5684Test.php @@ -14,7 +14,7 @@ */ class DDC5684Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); @@ -27,7 +27,7 @@ protected function setUp() $this->_schemaTool->createSchema([$this->_em->getClassMetadata(DDC5684Object::class)]); } - protected function tearDown() + protected function tearDown() : void { $this->_schemaTool->dropSchema([$this->_em->getClassMetadata(DDC5684Object::class)]); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC588Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC588Test.php index 7361bc4f403..cbd895c3d0d 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC588Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC588Test.php @@ -4,7 +4,7 @@ class DDC588Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC599Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC599Test.php index 842ccdd1a73..e1ef818c5c3 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC599Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC599Test.php @@ -4,7 +4,7 @@ class DDC599Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); //$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC618Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC618Test.php index 5e359863e91..44daf38e5fb 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC618Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC618Test.php @@ -7,7 +7,7 @@ */ class DDC618Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC6303Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC6303Test.php index 22c898eeb0a..432cc7ec346 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC6303Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC6303Test.php @@ -12,7 +12,7 @@ */ class DDC6303Test extends OrmFunctionalTestCase { - public function setUp() : void + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC633Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC633Test.php index 2ed53ed354f..a5facde97b5 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC633Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC633Test.php @@ -6,7 +6,7 @@ class DDC633Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC6460Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC6460Test.php index 9868c7d1c00..f0147cfa6ab 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC6460Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC6460Test.php @@ -13,7 +13,7 @@ class DDC6460Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC656Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC656Test.php index 1f94a3953a9..3ee395adfdd 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC656Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC656Test.php @@ -4,7 +4,7 @@ class DDC656Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC657Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC657Test.php index 759464a5f0e..68a718f1d09 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC657Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC657Test.php @@ -9,7 +9,7 @@ */ class DDC657Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('generic'); parent::setUp(); @@ -36,13 +36,13 @@ public function testScalarResult() $this->assertCount(2,$result); - $this->assertContains('11:11:11', $result[0]['time']); - $this->assertContains('2010-01-01', $result[0]['date']); - $this->assertContains('2010-01-01 11:11:11', $result[0]['datetime']); + $this->assertStringContainsString('11:11:11', $result[0]['time']); + $this->assertStringContainsString('2010-01-01', $result[0]['date']); + $this->assertStringContainsString('2010-01-01 11:11:11', $result[0]['datetime']); - $this->assertContains('12:12:12', $result[1]['time']); - $this->assertContains('2010-02-02', $result[1]['date']); - $this->assertContains('2010-02-02 12:12:12', $result[1]['datetime']); + $this->assertStringContainsString('12:12:12', $result[1]['time']); + $this->assertStringContainsString('2010-02-02', $result[1]['date']); + $this->assertStringContainsString('2010-02-02 12:12:12', $result[1]['datetime']); } public function testaTicketEntityArrayResult() diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC698Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC698Test.php index f21d6de6936..7dd584af344 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC698Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC698Test.php @@ -4,7 +4,7 @@ class DDC698Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC719Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC719Test.php index c6f1a2254cb..1818e7a80ed 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC719Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC719Test.php @@ -4,7 +4,7 @@ class DDC719Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); //$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC729Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC729Test.php index 8cc9642100d..ce9dd157b9b 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC729Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC729Test.php @@ -10,7 +10,7 @@ class DDC729Test extends \Doctrine\Tests\OrmFunctionalTestCase { use VerifyDeprecations; - public function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC735Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC735Test.php index afae6973bf7..2e91e34dcb7 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC735Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC735Test.php @@ -6,7 +6,7 @@ class DDC735Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC736Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC736Test.php index 932731bf6f5..7987c6da661 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC736Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC736Test.php @@ -10,7 +10,7 @@ class DDC736Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('ecommerce'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC742Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC742Test.php index 8adcb08795e..6758e842d3d 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC742Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC742Test.php @@ -13,7 +13,7 @@ class DDC742Test extends \Doctrine\Tests\OrmFunctionalTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC748Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC748Test.php index cfafc66dd64..2d73f0e8936 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC748Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC748Test.php @@ -9,7 +9,7 @@ class DDC748Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC758Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC758Test.php index e7a36310ed6..20399cb7596 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC758Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC758Test.php @@ -11,7 +11,7 @@ class DDC758Test extends \Doctrine\Tests\OrmFunctionalTestCase { use VerifyDeprecations; - public function setUp() + protected function setUp() : void { $this->markTestSkipped('Destroys testsuite'); $this->useModelSet("cms"); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC767Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC767Test.php index 8420db13275..6fdd2bab153 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC767Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC767Test.php @@ -7,7 +7,7 @@ class DDC767Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC809Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC809Test.php index 4c6464a188b..0a190c9b4d7 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC809Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC809Test.php @@ -4,7 +4,7 @@ class DDC809Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC812Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC812Test.php index 5b37a47923c..49159e68b3e 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC812Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC812Test.php @@ -7,7 +7,7 @@ class DDC812Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC832Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC832Test.php index fdae13585fc..0205f99d92e 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC832Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC832Test.php @@ -4,7 +4,7 @@ class DDC832Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); @@ -28,7 +28,7 @@ public function setUp() } } - public function tearDown() + public function tearDown() : void { /* @var $sm \Doctrine\DBAL\Schema\AbstractSchemaManager */ $platform = $this->_em->getConnection()->getDatabasePlatform(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC837Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC837Test.php index 4721a6b18be..1c93cffae3d 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC837Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC837Test.php @@ -4,7 +4,7 @@ class DDC837Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema( diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC849Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC849Test.php index 1844b316f37..19af190ee28 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC849Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC849Test.php @@ -11,7 +11,7 @@ class DDC849Test extends \Doctrine\Tests\OrmFunctionalTestCase private $group1; private $group2; - public function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC881Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC881Test.php index 3df61f7165c..376477a16d3 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC881Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC881Test.php @@ -7,8 +7,7 @@ class DDC881Test extends \Doctrine\Tests\OrmFunctionalTestCase { - - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC933Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC933Test.php index 9fda6ed03b8..d7539c41bc1 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC933Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC933Test.php @@ -10,7 +10,7 @@ class DDC933Test extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('company'); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC949Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC949Test.php index 8c3162df364..68e9187eccf 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC949Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC949Test.php @@ -7,7 +7,7 @@ class DDC949Test extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('generic'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC960Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC960Test.php index 730a70bce8c..f9b609f868f 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC960Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC960Test.php @@ -6,7 +6,7 @@ class DDC960Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC992Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC992Test.php index 77780486bd4..ae975412493 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC992Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC992Test.php @@ -9,7 +9,7 @@ */ class DDC992Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH2947Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH2947Test.php index 0b21b57f065..bfc3ca3a111 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH2947Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH2947Test.php @@ -10,7 +10,7 @@ */ class GH2947Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->resultCacheImpl = new ArrayCache(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5562Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5562Test.php index 824c4378add..2b42e2be904 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5562Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5562Test.php @@ -9,7 +9,7 @@ final class GH5562Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->enableSecondLevelCache(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5762Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5762Test.php index b7a748ddc46..e966d744030 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5762Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5762Test.php @@ -11,7 +11,7 @@ */ class GH5762Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5804Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5804Test.php index 77d4fbc878e..b4d530fde46 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5804Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5804Test.php @@ -13,7 +13,7 @@ */ final class GH5804Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5887Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5887Test.php index f19dd5924b5..dbe402da322 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5887Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5887Test.php @@ -12,7 +12,7 @@ */ class GH5887Test extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6029Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6029Test.php index 50696a51668..a7ab5890427 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6029Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6029Test.php @@ -11,7 +11,7 @@ final class GH6029Test extends OrmFunctionalTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6141Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6141Test.php index 00ae936a4b1..550ba87b4b9 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6141Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6141Test.php @@ -9,7 +9,7 @@ class GH6141Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6217Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6217Test.php index d781d0c816d..590793e26cf 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6217Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6217Test.php @@ -8,7 +8,7 @@ */ final class GH6217Test extends OrmFunctionalTestCase { - public function setUp() : void + protected function setUp() : void { $this->enableSecondLevelCache(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6362Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6362Test.php index 576fbd0eb86..ec7b38faa72 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6362Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6362Test.php @@ -9,7 +9,7 @@ final class GH6362Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6402Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6402Test.php index d675da94ad3..8436e5fdb11 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6402Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6402Test.php @@ -13,7 +13,7 @@ */ class GH6402Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('quote'); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6531Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6531Test.php index 1d819f2508f..56473f11219 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6531Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6531Test.php @@ -8,7 +8,7 @@ final class GH6531Test extends \Doctrine\Tests\OrmFunctionalTestCase { protected function setUp() : void { - parent::setup(); + parent::setUp(); $this->setUpEntitySchema( [ diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6740Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6740Test.php index 3589fa2fb8a..dccf69d5fd8 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6740Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6740Test.php @@ -24,7 +24,7 @@ final class GH6740Test extends OrmFunctionalTestCase */ private $secondCategoryId; - public function setUp() : void + protected function setUp() : void { $this->useModelSet('ecommerce'); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7067Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7067Test.php index 15dc5fa9caf..18b81f434fb 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7067Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7067Test.php @@ -5,7 +5,7 @@ final class GH7067Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() : void + protected function setUp() : void { $this->enableSecondLevelCache(); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7068Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7068Test.php index 297d77e0364..234b7fbce62 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7068Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7068Test.php @@ -11,7 +11,7 @@ final class GH7068Test extends OrmFunctionalTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7629Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7629Test.php index a0c100acaaa..7a007447fcf 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7629Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7629Test.php @@ -9,7 +9,7 @@ class GH7629Test extends OrmFunctionalTestCase /** * {@inheritDoc} */ - protected function setUp(): void + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7735Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7735Test.php index 52a10dc6435..a9cdc102678 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7735Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7735Test.php @@ -9,7 +9,7 @@ final class GH7735Test extends OrmFunctionalTestCase { - public function setUp() : void + protected function setUp() : void { $this->enableSecondLevelCache(); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7829Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7829Test.php index 08f91d2a8ea..88a4b018859 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7829Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7829Test.php @@ -17,7 +17,7 @@ final class GH7829Test extends OrmFunctionalTestCase /** @var DebugStack */ private $logger; - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7864Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7864Test.php index 4c1bb64e695..b4916ffe5bb 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7864Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7864Test.php @@ -15,7 +15,7 @@ class GH7864Test extends OrmFunctionalTestCase { protected function setUp() : void { - parent::setup(); + parent::setUp(); $this->setUpEntitySchema( [ diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH8229Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH8229Test.php index d07405811c3..e32ff11c59e 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH8229Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH8229Test.php @@ -15,7 +15,7 @@ */ class GH8229Test extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/Issue5989Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/Issue5989Test.php index cf601b99aed..b9007ce4431 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/Issue5989Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/Issue5989Test.php @@ -11,7 +11,7 @@ */ class Issue5989Test extends \Doctrine\Tests\OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('issue5989'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket2481Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket2481Test.php index ebedf0c869f..ebaa71f840f 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket2481Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket2481Test.php @@ -4,7 +4,7 @@ class Ticket2481Test extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfAbstractTest.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfAbstractTest.php index 5fa5cdc86ea..eaee1aae59e 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfAbstractTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfAbstractTest.php @@ -6,7 +6,7 @@ class Ticket4646InstanceOfAbstractTest extends OrmFunctionalTestCase { - protected function setUp(): void + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfMultiLevelTest.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfMultiLevelTest.php index 2c111a9e613..6f4e591ebae 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfMultiLevelTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfMultiLevelTest.php @@ -6,7 +6,7 @@ class Ticket4646InstanceOfMultiLevelTest extends OrmFunctionalTestCase { - protected function setUp(): void + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfParametricTest.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfParametricTest.php index bf11c3a85d6..1f92cb02cc0 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfParametricTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfParametricTest.php @@ -6,7 +6,7 @@ class Ticket4646InstanceOfParametricTest extends OrmFunctionalTestCase { - protected function setUp(): void + protected function setUp() : void { parent::setUp(); $this->_schemaTool->createSchema([ diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfTest.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfTest.php index 0ed97243c0e..7d95270d9ec 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfTest.php @@ -6,7 +6,7 @@ class Ticket4646InstanceOfTest extends OrmFunctionalTestCase { - protected function setUp(): void + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfWithMultipleParametersTest.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfWithMultipleParametersTest.php index c8c172ab694..b63b2d9ce3f 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfWithMultipleParametersTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket4646InstanceOfWithMultipleParametersTest.php @@ -6,7 +6,7 @@ class Ticket4646MultipleInstanceOfWithMultipleParametersTest extends OrmFunctionalTestCase { - protected function setUp(): void + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket69.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket69.php index ccc8bce120c..369e326a7f2 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket69.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket69.php @@ -8,7 +8,7 @@ * @author robo */ class AdvancedAssociationTest extends \Doctrine\Tests\OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); try { diff --git a/tests/Doctrine/Tests/ORM/Functional/TypeTest.php b/tests/Doctrine/Tests/ORM/Functional/TypeTest.php index 9dd99777a04..0771e30da4e 100644 --- a/tests/Doctrine/Tests/ORM/Functional/TypeTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/TypeTest.php @@ -12,7 +12,7 @@ class TypeTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('generic'); diff --git a/tests/Doctrine/Tests/ORM/Functional/TypeValueSqlTest.php b/tests/Doctrine/Tests/ORM/Functional/TypeValueSqlTest.php index 3af954cfd97..b51d5a133f1 100644 --- a/tests/Doctrine/Tests/ORM/Functional/TypeValueSqlTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/TypeValueSqlTest.php @@ -12,7 +12,7 @@ class TypeValueSqlTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { if (DBALType::hasType(UpperCaseStringType::NAME)) { DBALType::overrideType(UpperCaseStringType::NAME, UpperCaseStringType::class); diff --git a/tests/Doctrine/Tests/ORM/Functional/UUIDGeneratorTest.php b/tests/Doctrine/Tests/ORM/Functional/UUIDGeneratorTest.php index ff352ba1f11..258bd4188b2 100644 --- a/tests/Doctrine/Tests/ORM/Functional/UUIDGeneratorTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/UUIDGeneratorTest.php @@ -7,7 +7,7 @@ */ class UUIDGeneratorTest extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/UnitOfWorkLifecycleTest.php b/tests/Doctrine/Tests/ORM/Functional/UnitOfWorkLifecycleTest.php index 8c4c500e728..2688d178183 100644 --- a/tests/Doctrine/Tests/ORM/Functional/UnitOfWorkLifecycleTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/UnitOfWorkLifecycleTest.php @@ -8,7 +8,7 @@ class UnitOfWorkLifecycleTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { $this->useModelSet('cms'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/ManyToManyCompositeIdForeignKeyTest.php b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/ManyToManyCompositeIdForeignKeyTest.php index 108ba743737..e314e8172e7 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/ManyToManyCompositeIdForeignKeyTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/ManyToManyCompositeIdForeignKeyTest.php @@ -17,7 +17,7 @@ */ class ManyToManyCompositeIdForeignKeyTest extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('vct_manytomany_compositeid_foreignkey'); @@ -44,7 +44,7 @@ public function setUp() $this->_em->clear(); } - public static function tearDownAfterClass() + public static function tearDownAfterClass() : void { $conn = static::$_sharedConn; diff --git a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/ManyToManyCompositeIdTest.php b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/ManyToManyCompositeIdTest.php index 4403f2bf959..99bec4a4a50 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/ManyToManyCompositeIdTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/ManyToManyCompositeIdTest.php @@ -16,7 +16,7 @@ */ class ManyToManyCompositeIdTest extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('vct_manytomany_compositeid'); @@ -39,7 +39,7 @@ public function setUp() $this->_em->clear(); } - public static function tearDownAfterClass() + public static function tearDownAfterClass() : void { $conn = static::$_sharedConn; diff --git a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/ManyToManyExtraLazyTest.php b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/ManyToManyExtraLazyTest.php index af1d99de3f9..06f1c091a0c 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/ManyToManyExtraLazyTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/ManyToManyExtraLazyTest.php @@ -17,7 +17,7 @@ */ class ManyToManyExtraLazyTest extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('vct_manytomany_extralazy'); parent::setUp(); @@ -53,7 +53,7 @@ public function setUp() $this->_em->clear(); } - public static function tearDownAfterClass() + public static function tearDownAfterClass() : void { $conn = static::$_sharedConn; diff --git a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/ManyToManyTest.php b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/ManyToManyTest.php index 4532ee9d5fc..4ebec8d071f 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/ManyToManyTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/ManyToManyTest.php @@ -16,7 +16,7 @@ */ class ManyToManyTest extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('vct_manytomany'); @@ -38,7 +38,7 @@ public function setUp() $this->_em->clear(); } - public static function tearDownAfterClass() + public static function tearDownAfterClass() : void { $conn = static::$_sharedConn; diff --git a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToManyCompositeIdForeignKeyTest.php b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToManyCompositeIdForeignKeyTest.php index b76687bc4b3..a8e017b0c96 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToManyCompositeIdForeignKeyTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToManyCompositeIdForeignKeyTest.php @@ -17,7 +17,7 @@ */ class OneToManyCompositeIdForeignKeyTest extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('vct_onetomany_compositeid_foreignkey'); @@ -45,7 +45,7 @@ public function setUp() $this->_em->clear(); } - public static function tearDownAfterClass() + public static function tearDownAfterClass() : void { $conn = static::$_sharedConn; diff --git a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToManyCompositeIdTest.php b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToManyCompositeIdTest.php index 266a382e760..359def14337 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToManyCompositeIdTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToManyCompositeIdTest.php @@ -16,7 +16,7 @@ */ class OneToManyCompositeIdTest extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('vct_onetomany_compositeid'); @@ -40,7 +40,7 @@ public function setUp() $this->_em->clear(); } - public static function tearDownAfterClass() + public static function tearDownAfterClass() : void { $conn = static::$_sharedConn; diff --git a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToManyExtraLazyTest.php b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToManyExtraLazyTest.php index 9da341467a4..244c5fe1b99 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToManyExtraLazyTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToManyExtraLazyTest.php @@ -17,7 +17,7 @@ */ class OneToManyExtraLazyTest extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('vct_onetomany_extralazy'); @@ -51,7 +51,7 @@ public function setUp() $this->_em->clear(); } - public static function tearDownAfterClass() + public static function tearDownAfterClass() : void { $conn = static::$_sharedConn; diff --git a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToManyTest.php b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToManyTest.php index 6a10296a7f9..f210e2ec84f 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToManyTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToManyTest.php @@ -16,7 +16,7 @@ */ class OneToManyTest extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('vct_onetomany'); @@ -39,7 +39,7 @@ public function setUp() $this->_em->clear(); } - public static function tearDownAfterClass() + public static function tearDownAfterClass() : void { $conn = static::$_sharedConn; diff --git a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToOneCompositeIdForeignKeyTest.php b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToOneCompositeIdForeignKeyTest.php index 206ca7e3258..f5bd984c043 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToOneCompositeIdForeignKeyTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToOneCompositeIdForeignKeyTest.php @@ -17,7 +17,7 @@ */ class OneToOneCompositeIdForeignKeyTest extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('vct_onetoone_compositeid_foreignkey'); parent::setUp(); @@ -44,7 +44,7 @@ public function setUp() $this->_em->clear(); } - public static function tearDownAfterClass() + public static function tearDownAfterClass() : void { $conn = static::$_sharedConn; diff --git a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToOneCompositeIdTest.php b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToOneCompositeIdTest.php index 428fe80c6c5..df63a3906ec 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToOneCompositeIdTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToOneCompositeIdTest.php @@ -16,7 +16,7 @@ */ class OneToOneCompositeIdTest extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('vct_onetoone_compositeid'); parent::setUp(); @@ -39,7 +39,7 @@ public function setUp() $this->_em->clear(); } - public static function tearDownAfterClass() + public static function tearDownAfterClass() : void { $conn = static::$_sharedConn; diff --git a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToOneTest.php b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToOneTest.php index 8ca8eebe56d..9bba31c7529 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToOneTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ValueConversionType/OneToOneTest.php @@ -16,7 +16,7 @@ */ class OneToOneTest extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { $this->useModelSet('vct_onetoone'); @@ -39,7 +39,7 @@ public function setUp() $this->_em->clear(); } - public static function tearDownAfterClass() + public static function tearDownAfterClass() : void { $conn = static::$_sharedConn; diff --git a/tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php b/tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php index efeac8414a9..b1e6fdd93d1 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php @@ -21,7 +21,7 @@ */ class ValueObjectsTest extends OrmFunctionalTestCase { - public function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Functional/VersionedOneToOneTest.php b/tests/Doctrine/Tests/ORM/Functional/VersionedOneToOneTest.php index f8062f9954e..8548b1834a2 100644 --- a/tests/Doctrine/Tests/ORM/Functional/VersionedOneToOneTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/VersionedOneToOneTest.php @@ -16,7 +16,7 @@ */ class VersionedOneToOneTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Hydration/HydrationTestCase.php b/tests/Doctrine/Tests/ORM/Hydration/HydrationTestCase.php index a2b099162be..3284e026fb6 100644 --- a/tests/Doctrine/Tests/ORM/Hydration/HydrationTestCase.php +++ b/tests/Doctrine/Tests/ORM/Hydration/HydrationTestCase.php @@ -8,7 +8,7 @@ class HydrationTestCase extends \Doctrine\Tests\OrmTestCase { protected $_em; - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->_em = $this->_getTestEntityManager(); diff --git a/tests/Doctrine/Tests/ORM/Hydration/ObjectHydratorTest.php b/tests/Doctrine/Tests/ORM/Hydration/ObjectHydratorTest.php index c7d82a0dc7a..56e6db2ea96 100644 --- a/tests/Doctrine/Tests/ORM/Hydration/ObjectHydratorTest.php +++ b/tests/Doctrine/Tests/ORM/Hydration/ObjectHydratorTest.php @@ -407,9 +407,9 @@ public function testMixedQueryNormalJoin($userEntityKey) $this->assertEquals(2, count($result)); - $this->assertInternalType('array', $result); - $this->assertInternalType('array', $result[0]); - $this->assertInternalType('array', $result[1]); + $this->assertIsArray($result); + $this->assertIsArray($result[0]); + $this->assertIsArray($result[1]); // first user => 2 phonenumbers $this->assertEquals(2, $result[0]['numPhones']); @@ -471,9 +471,9 @@ public function testMixedQueryFetchJoin($userEntityKey) $this->assertEquals(2, count($result)); - $this->assertInternalType('array', $result); - $this->assertInternalType('array', $result[0]); - $this->assertInternalType('array', $result[1]); + $this->assertIsArray($result); + $this->assertIsArray($result[0]); + $this->assertIsArray($result[1]); $this->assertInstanceOf(CmsUser::class, $result[0][$userEntityKey]); $this->assertInstanceOf(PersistentCollection::class, $result[0][$userEntityKey]->phonenumbers); @@ -552,9 +552,9 @@ public function testMixedQueryFetchJoinCustomIndex($userEntityKey) $this->assertEquals(2, count($result)); - $this->assertInternalType('array', $result); - $this->assertInternalType('array', $result[1]); - $this->assertInternalType('array', $result[2]); + $this->assertIsArray($result); + $this->assertIsArray($result[1]); + $this->assertIsArray($result[2]); // test the scalar values $this->assertEquals('ROMANB', $result[1]['nameUpper']); @@ -985,8 +985,8 @@ public function testScalarQueryWithoutResultVariables($userEntityKey) $this->assertEquals(2, count($result)); - $this->assertInternalType('array', $result[0]); - $this->assertInternalType('array', $result[1]); + $this->assertIsArray($result[0]); + $this->assertIsArray($result[1]); $this->assertEquals(1, $result[0]['id']); $this->assertEquals('romanb', $result[0]['name']); @@ -1090,7 +1090,7 @@ public function testCreatesProxyForLazyLoadingWithForeignKeysWithAliasedProductE $this->assertEquals(1, count($result)); - $this->assertInternalType('array', $result[0]); + $this->assertIsArray($result[0]); $this->assertInstanceOf(ECommerceProduct::class, $result[0]['product']); } @@ -1213,10 +1213,10 @@ public function testChainedJoinWithEmptyCollectionsWithAliasedUserEntity() $this->assertEquals(2, count($result)); - $this->assertInternalType('array', $result[0]); + $this->assertIsArray($result[0]); $this->assertInstanceOf(CmsUser::class, $result[0]['user']); - $this->assertInternalType('array', $result[1]); + $this->assertIsArray($result[1]); $this->assertInstanceOf(CmsUser::class, $result[1]['user']); $this->assertEquals(0, $result[0]['user']->articles->count()); @@ -1550,9 +1550,9 @@ public function testManyToManyHydrationWithAliasedUserEntity() $this->assertEquals(2, count($result)); - $this->assertInternalType('array', $result[0]); + $this->assertIsArray($result[0]); $this->assertInstanceOf(CmsUser::class, $result[0]['user']); - $this->assertInternalType('array', $result[1]); + $this->assertIsArray($result[1]); $this->assertInstanceOf(CmsUser::class, $result[1]['user']); $this->assertEquals(2, count($result[0]['user']->groups)); @@ -1822,12 +1822,11 @@ public function testIndexByScalarsOnly($userEntityKey) /** * @group DDC-1470 - * - * @expectedException \Doctrine\ORM\Internal\Hydration\HydrationException - * @expectedExceptionMessage The meta mapping for the discriminator column "c_discr" is missing for "Doctrine\Tests\Models\Company\CompanyFixContract" using the DQL alias "c". */ public function testMissingMetaMappingException() { + $this->expectException('Doctrine\ORM\Internal\Hydration\HydrationException'); + $this->expectExceptionMessage('The meta mapping for the discriminator column "c_discr" is missing for "Doctrine\Tests\Models\Company\CompanyFixContract" using the DQL alias "c".'); $rsm = new ResultSetMapping; $rsm->addEntityResult(CompanyFixContract::class, 'c'); @@ -1849,12 +1848,11 @@ public function testMissingMetaMappingException() /** * @group DDC-1470 - * - * @expectedException \Doctrine\ORM\Internal\Hydration\HydrationException - * @expectedExceptionMessage The discriminator column "discr" is missing for "Doctrine\Tests\Models\Company\CompanyEmployee" using the DQL alias "e". */ public function testMissingDiscriminatorColumnException() { + $this->expectException('Doctrine\ORM\Internal\Hydration\HydrationException'); + $this->expectExceptionMessage('The discriminator column "discr" is missing for "Doctrine\Tests\Models\Company\CompanyEmployee" using the DQL alias "e".'); $rsm = new ResultSetMapping; $rsm->addEntityResult(CompanyFixContract::class, 'c'); @@ -1883,12 +1881,11 @@ public function testMissingDiscriminatorColumnException() /** * @group DDC-3076 - * - * @expectedException \Doctrine\ORM\Internal\Hydration\HydrationException - * @expectedExceptionMessage The discriminator value "subworker" is invalid. It must be one of "person", "manager", "employee". */ public function testInvalidDiscriminatorValueException() { + $this->expectException('Doctrine\ORM\Internal\Hydration\HydrationException'); + $this->expectExceptionMessage('The discriminator value "subworker" is invalid. It must be one of "person", "manager", "employee".'); $rsm = new ResultSetMapping; $rsm->addEntityResult(CompanyPerson::class, 'p'); diff --git a/tests/Doctrine/Tests/ORM/Hydration/ResultSetMappingTest.php b/tests/Doctrine/Tests/ORM/Hydration/ResultSetMappingTest.php index e341a351314..6eb33126c0b 100644 --- a/tests/Doctrine/Tests/ORM/Hydration/ResultSetMappingTest.php +++ b/tests/Doctrine/Tests/ORM/Hydration/ResultSetMappingTest.php @@ -28,7 +28,8 @@ class ResultSetMappingTest extends \Doctrine\Tests\OrmTestCase */ private $_em; - protected function setUp() { + protected function setUp() : void + { parent::setUp(); $this->_rsm = new ResultSetMapping; $this->_em = $this->_getTestEntityManager(); diff --git a/tests/Doctrine/Tests/ORM/Hydration/ScalarHydratorTest.php b/tests/Doctrine/Tests/ORM/Hydration/ScalarHydratorTest.php index 919486cc8ec..dd2aab48f5a 100644 --- a/tests/Doctrine/Tests/ORM/Hydration/ScalarHydratorTest.php +++ b/tests/Doctrine/Tests/ORM/Hydration/ScalarHydratorTest.php @@ -37,7 +37,7 @@ public function testNewHydrationSimpleEntityQuery() $result = $hydrator->hydrateAll($stmt, $rsm); - $this->assertInternalType('array', $result); + $this->assertIsArray($result); $this->assertCount(2, $result); $this->assertEquals('romanb', $result[0]['u_name']); $this->assertEquals(1, $result[0]['u_id']); diff --git a/tests/Doctrine/Tests/ORM/Hydration/SimpleObjectHydratorTest.php b/tests/Doctrine/Tests/ORM/Hydration/SimpleObjectHydratorTest.php index ffcd81e3571..76c286ab545 100644 --- a/tests/Doctrine/Tests/ORM/Hydration/SimpleObjectHydratorTest.php +++ b/tests/Doctrine/Tests/ORM/Hydration/SimpleObjectHydratorTest.php @@ -14,12 +14,11 @@ class SimpleObjectHydratorTest extends HydrationTestCase { /** * @group DDC-1470 - * - * @expectedException \Doctrine\ORM\Internal\Hydration\HydrationException - * @expectedExceptionMessage The discriminator column "discr" is missing for "Doctrine\Tests\Models\Company\CompanyPerson" using the DQL alias "p". */ public function testMissingDiscriminatorColumnException() { + $this->expectException('Doctrine\ORM\Internal\Hydration\HydrationException'); + $this->expectExceptionMessage('The discriminator column "discr" is missing for "Doctrine\Tests\Models\Company\CompanyPerson" using the DQL alias "p".'); $rsm = new ResultSetMapping; $rsm->addEntityResult(CompanyPerson::class, 'p'); $rsm->addFieldResult('p', 'p__id', 'id'); @@ -64,12 +63,11 @@ public function testExtraFieldInResultSetShouldBeIgnore() /** * @group DDC-3076 - * - * @expectedException \Doctrine\ORM\Internal\Hydration\HydrationException - * @expectedExceptionMessage The discriminator value "subworker" is invalid. It must be one of "person", "manager", "employee". */ public function testInvalidDiscriminatorValueException() { + $this->expectException('Doctrine\ORM\Internal\Hydration\HydrationException'); + $this->expectExceptionMessage('The discriminator value "subworker" is invalid. It must be one of "person", "manager", "employee".'); $rsm = new ResultSetMapping; $rsm->addEntityResult(CompanyPerson::class, 'p'); diff --git a/tests/Doctrine/Tests/ORM/Id/AssignedGeneratorTest.php b/tests/Doctrine/Tests/ORM/Id/AssignedGeneratorTest.php index aa0240ebcd5..86f8b5a0922 100644 --- a/tests/Doctrine/Tests/ORM/Id/AssignedGeneratorTest.php +++ b/tests/Doctrine/Tests/ORM/Id/AssignedGeneratorTest.php @@ -16,7 +16,7 @@ class AssignedGeneratorTest extends OrmTestCase private $_em; private $_assignedGen; - protected function setUp() + protected function setUp() : void { $this->_em = $this->_getTestEntityManager(); $this->_assignedGen = new AssignedGenerator; diff --git a/tests/Doctrine/Tests/ORM/Internal/HydrationCompleteHandlerTest.php b/tests/Doctrine/Tests/ORM/Internal/HydrationCompleteHandlerTest.php index bd8046a99a4..c3cfe4052ec 100644 --- a/tests/Doctrine/Tests/ORM/Internal/HydrationCompleteHandlerTest.php +++ b/tests/Doctrine/Tests/ORM/Internal/HydrationCompleteHandlerTest.php @@ -53,7 +53,7 @@ class HydrationCompleteHandlerTest extends TestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { $this->listenersInvoker = $this->createMock(ListenersInvoker::class); $this->entityManager = $this->createMock(EntityManagerInterface::class); diff --git a/tests/Doctrine/Tests/ORM/LazyCriteriaCollectionTest.php b/tests/Doctrine/Tests/ORM/LazyCriteriaCollectionTest.php index 9286da614f8..9cde0e758a9 100644 --- a/tests/Doctrine/Tests/ORM/LazyCriteriaCollectionTest.php +++ b/tests/Doctrine/Tests/ORM/LazyCriteriaCollectionTest.php @@ -34,7 +34,7 @@ class LazyCriteriaCollectionTest extends TestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { $this->persister = $this->createMock(EntityPersister::class); $this->criteria = new Criteria(); diff --git a/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php index f9bbe629e29..2a385dfc722 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php @@ -149,7 +149,7 @@ public function testEntityOptions($class) */ public function testEntitySequence($class) { - $this->assertInternalType('array', $class->sequenceGeneratorDefinition, 'No Sequence Definition set on this driver.'); + $this->assertIsArray($class->sequenceGeneratorDefinition, 'No Sequence Definition set on this driver.'); $this->assertEquals( [ 'sequenceName' => 'tablename_seq', @@ -275,10 +275,10 @@ public function testBooleanValuesForOptionIsSetCorrectly() { $class = $this->createClassMetadata(User::class); - $this->assertInternalType('bool', $class->fieldMappings['id']['options']['unsigned']); + $this->assertIsBool($class->fieldMappings['id']['options']['unsigned']); $this->assertFalse($class->fieldMappings['id']['options']['unsigned']); - $this->assertInternalType('bool', $class->fieldMappings['name']['options']['fixed']); + $this->assertIsBool($class->fieldMappings['name']['options']['fixed']); $this->assertFalse($class->fieldMappings['name']['options']['fixed']); return $class; diff --git a/tests/Doctrine/Tests/ORM/Mapping/AnnotationDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/AnnotationDriverTest.php index c23c359b74d..e4be969de85 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/AnnotationDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/AnnotationDriverTest.php @@ -35,12 +35,10 @@ public function testLoadMetadataForNonEntityThrowsException() $annotationDriver->loadMetadataForClass('stdClass', $cm); } - /** - * @expectedException Doctrine\ORM\Cache\CacheException - * @expectedExceptionMessage Entity association field "Doctrine\Tests\ORM\Mapping\AnnotationSLC#foo" not configured as part of the second-level cache. - */ public function testFailingSecondLevelCacheAssociation() { + $this->expectException('Doctrine\ORM\Cache\CacheException'); + $this->expectExceptionMessage('Entity association field "Doctrine\Tests\ORM\Mapping\AnnotationSLC#foo" not configured as part of the second-level cache.'); $mappingDriver = $this->_loadDriver(); $class = new ClassMetadata(AnnotationSLC::class); diff --git a/tests/Doctrine/Tests/ORM/Mapping/AnsiQuoteStrategyTest.php b/tests/Doctrine/Tests/ORM/Mapping/AnsiQuoteStrategyTest.php index f447a561950..344ba6985ab 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/AnsiQuoteStrategyTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/AnsiQuoteStrategyTest.php @@ -28,7 +28,7 @@ class AnsiQuoteStrategyTest extends OrmTestCase */ private $platform; - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php b/tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php index cc95a21b641..ae5e21aae99 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php @@ -24,7 +24,8 @@ class BasicInheritanceMappingTest extends OrmTestCase /** * {@inheritDoc} */ - protected function setUp() { + protected function setUp() : void + { $this->cmf = new ClassMetadataFactory(); $this->cmf->setEntityManager($this->_getTestEntityManager()); diff --git a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataBuilderTest.php b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataBuilderTest.php index 5b0881de425..ce42a4ef45f 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataBuilderTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataBuilderTest.php @@ -26,7 +26,7 @@ class ClassMetadataBuilderTest extends OrmTestCase */ private $builder; - public function setUp() + protected function setUp() : void { $this->cm = new ClassMetadata(CmsUser::class); $this->cm->initializeReflection(new RuntimeReflectionService()); diff --git a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php index f58010fb5a7..99672bd081b 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php @@ -29,6 +29,7 @@ use Doctrine\Tests\Models\Quote; use Doctrine\Tests\OrmTestCase; use DoctrineGlobal_Article; +use ReflectionClass; class ClassMetadataFactoryTest extends OrmTestCase { @@ -411,7 +412,10 @@ public function testAcceptsEntityManagerInterfaceInstances() $classMetadataFactory->setEntityManager($entityManager); // not really the cleanest way to check it, but we won't add a getter to the CMF just for the sake of testing. - $this->assertAttributeSame($entityManager, 'em', $classMetadataFactory); + $class = new ReflectionClass(ClassMetadataFactory::class); + $property = $class->getProperty('em'); + $property->setAccessible(true); + $this->assertSame($entityManager, $property->getValue($classMetadataFactory)); } /** diff --git a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php index b4976550967..b5fbe239724 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php @@ -811,12 +811,10 @@ public function testSerializeEntityListeners() $this->assertEquals($metadata->entityListeners, $unserialize->entityListeners); } - /** - * @expectedException \Doctrine\ORM\Mapping\MappingException - * @expectedExceptionMessage Query named "userById" in "Doctrine\Tests\Models\CMS\CmsUser" was already declared, but it must be declared only once - */ public function testNamingCollisionNamedQueryShouldThrowException() { + $this->expectException('Doctrine\ORM\Mapping\MappingException'); + $this->expectExceptionMessage('Query named "userById" in "Doctrine\Tests\Models\CMS\CmsUser" was already declared, but it must be declared only once'); $cm = new ClassMetadata(CMS\CmsUser::class); $cm->initializeReflection(new RuntimeReflectionService()); @@ -837,12 +835,11 @@ public function testNamingCollisionNamedQueryShouldThrowException() /** * @group DDC-1663 - * - * @expectedException \Doctrine\ORM\Mapping\MappingException - * @expectedExceptionMessage Query named "find-all" in "Doctrine\Tests\Models\CMS\CmsUser" was already declared, but it must be declared only once */ public function testNamingCollisionNamedNativeQueryShouldThrowException() { + $this->expectException('Doctrine\ORM\Mapping\MappingException'); + $this->expectExceptionMessage('Query named "find-all" in "Doctrine\Tests\Models\CMS\CmsUser" was already declared, but it must be declared only once'); $cm = new ClassMetadata(CMS\CmsUser::class); $cm->initializeReflection(new RuntimeReflectionService()); @@ -867,12 +864,11 @@ public function testNamingCollisionNamedNativeQueryShouldThrowException() /** * @group DDC-1663 - * - * @expectedException \Doctrine\ORM\Mapping\MappingException - * @expectedExceptionMessage Result set mapping named "find-all" in "Doctrine\Tests\Models\CMS\CmsUser" was already declared, but it must be declared only once */ public function testNamingCollisionSqlResultSetMappingShouldThrowException() { + $this->expectException('Doctrine\ORM\Mapping\MappingException'); + $this->expectExceptionMessage('Result set mapping named "find-all" in "Doctrine\Tests\Models\CMS\CmsUser" was already declared, but it must be declared only once'); $cm = new ClassMetadata(CMS\CmsUser::class); $cm->initializeReflection(new RuntimeReflectionService()); @@ -943,12 +939,11 @@ public function testTargetEntityNotFound() /** * @group DDC-1663 - * - * @expectedException \Doctrine\ORM\Mapping\MappingException - * @expectedExceptionMessage Query name on entity class 'Doctrine\Tests\Models\CMS\CmsUser' is not defined. */ public function testNameIsMandatoryForNamedQueryMappingException() { + $this->expectException('Doctrine\ORM\Mapping\MappingException'); + $this->expectExceptionMessage('Query name on entity class \'Doctrine\Tests\Models\CMS\CmsUser\' is not defined.'); $cm = new ClassMetadata(CMS\CmsUser::class); $cm->initializeReflection(new RuntimeReflectionService()); $cm->addNamedQuery( @@ -960,12 +955,11 @@ public function testNameIsMandatoryForNamedQueryMappingException() /** * @group DDC-1663 - * - * @expectedException \Doctrine\ORM\Mapping\MappingException - * @expectedExceptionMessage Query name on entity class 'Doctrine\Tests\Models\CMS\CmsUser' is not defined. */ public function testNameIsMandatoryForNameNativeQueryMappingException() { + $this->expectException('Doctrine\ORM\Mapping\MappingException'); + $this->expectExceptionMessage('Query name on entity class \'Doctrine\Tests\Models\CMS\CmsUser\' is not defined.'); $cm = new ClassMetadata(CMS\CmsUser::class); $cm->initializeReflection(new RuntimeReflectionService()); $cm->addNamedQuery( @@ -979,12 +973,11 @@ public function testNameIsMandatoryForNameNativeQueryMappingException() /** * @group DDC-1663 - * - * @expectedException \Doctrine\ORM\Mapping\MappingException - * @expectedExceptionMessage Result set mapping named "find-all" in "Doctrine\Tests\Models\CMS\CmsUser requires a entity class name. */ public function testNameIsMandatoryForEntityNameSqlResultSetMappingException() { + $this->expectException('Doctrine\ORM\Mapping\MappingException'); + $this->expectExceptionMessage('Result set mapping named "find-all" in "Doctrine\Tests\Models\CMS\CmsUser requires a entity class name.'); $cm = new ClassMetadata(CMS\CmsUser::class); $cm->initializeReflection(new RuntimeReflectionService()); $cm->addSqlResultSetMapping( @@ -999,12 +992,10 @@ public function testNameIsMandatoryForEntityNameSqlResultSetMappingException() ); } - /** - * @expectedException \Doctrine\ORM\Mapping\MappingException - * @expectedExceptionMessage Discriminator column name on entity class 'Doctrine\Tests\Models\CMS\CmsUser' is not defined. - */ public function testNameIsMandatoryForDiscriminatorColumnsMappingException() { + $this->expectException('Doctrine\ORM\Mapping\MappingException'); + $this->expectExceptionMessage('Discriminator column name on entity class \'Doctrine\Tests\Models\CMS\CmsUser\' is not defined.'); $cm = new ClassMetadata(CMS\CmsUser::class); $cm->initializeReflection(new RuntimeReflectionService()); $cm->setDiscriminatorColumn([]); @@ -1082,11 +1073,11 @@ public function testInvalidCascade() /** * @group DDC-964 - * @expectedException Doctrine\ORM\Mapping\MappingException - * @expectedExceptionMessage Invalid field override named 'invalidPropertyName' for class 'Doctrine\Tests\Models\DDC964\DDC964Admin */ public function testInvalidPropertyAssociationOverrideNameException() { + $this->expectException('Doctrine\ORM\Mapping\MappingException'); + $this->expectExceptionMessage('Invalid field override named \'invalidPropertyName\' for class \'Doctrine\Tests\Models\DDC964\DDC964Admin'); $cm = new ClassMetadata(DDC964Admin::class); $cm->initializeReflection(new RuntimeReflectionService()); $cm->mapManyToOne(['fieldName' => 'address', 'targetEntity' => 'DDC964Address']); @@ -1096,11 +1087,11 @@ public function testInvalidPropertyAssociationOverrideNameException() /** * @group DDC-964 - * @expectedException Doctrine\ORM\Mapping\MappingException - * @expectedExceptionMessage Invalid field override named 'invalidPropertyName' for class 'Doctrine\Tests\Models\DDC964\DDC964Guest'. */ public function testInvalidPropertyAttributeOverrideNameException() { + $this->expectException('Doctrine\ORM\Mapping\MappingException'); + $this->expectExceptionMessage('Invalid field override named \'invalidPropertyName\' for class \'Doctrine\Tests\Models\DDC964\DDC964Guest\'.'); $cm = new ClassMetadata(DDC964Guest::class); $cm->initializeReflection(new RuntimeReflectionService()); $cm->mapField(['fieldName' => 'name']); @@ -1110,11 +1101,11 @@ public function testInvalidPropertyAttributeOverrideNameException() /** * @group DDC-964 - * @expectedException Doctrine\ORM\Mapping\MappingException - * @expectedExceptionMessage The column type of attribute 'name' on class 'Doctrine\Tests\Models\DDC964\DDC964Guest' could not be changed. */ public function testInvalidOverrideAttributeFieldTypeException() { + $this->expectException('Doctrine\ORM\Mapping\MappingException'); + $this->expectExceptionMessage('The column type of attribute \'name\' on class \'Doctrine\Tests\Models\DDC964\DDC964Guest\' could not be changed.'); $cm = new ClassMetadata(DDC964Guest::class); $cm->initializeReflection(new RuntimeReflectionService()); $cm->mapField(['fieldName' => 'name', 'type'=>'string']); @@ -1124,12 +1115,11 @@ public function testInvalidOverrideAttributeFieldTypeException() /** * @group DDC-1955 - * - * @expectedException Doctrine\ORM\Mapping\MappingException - * @expectedExceptionMessage Entity Listener "\InvalidClassName" declared on "Doctrine\Tests\Models\CMS\CmsUser" not found. */ public function testInvalidEntityListenerClassException() { + $this->expectException('Doctrine\ORM\Mapping\MappingException'); + $this->expectExceptionMessage('Entity Listener "\InvalidClassName" declared on "Doctrine\Tests\Models\CMS\CmsUser" not found.'); $cm = new ClassMetadata(CMS\CmsUser::class); $cm->initializeReflection(new RuntimeReflectionService()); @@ -1138,12 +1128,11 @@ public function testInvalidEntityListenerClassException() /** * @group DDC-1955 - * - * @expectedException Doctrine\ORM\Mapping\MappingException - * @expectedExceptionMessage Entity Listener "\Doctrine\Tests\Models\Company\CompanyContractListener" declared on "Doctrine\Tests\Models\CMS\CmsUser" has no method "invalidMethod". */ public function testInvalidEntityListenerMethodException() { + $this->expectException('Doctrine\ORM\Mapping\MappingException'); + $this->expectExceptionMessage('Entity Listener "\Doctrine\Tests\Models\Company\CompanyContractListener" declared on "Doctrine\Tests\Models\CMS\CmsUser" has no method "invalidMethod".'); $cm = new ClassMetadata(CMS\CmsUser::class); $cm->initializeReflection(new RuntimeReflectionService()); diff --git a/tests/Doctrine/Tests/ORM/Mapping/EntityListenerResolverTest.php b/tests/Doctrine/Tests/ORM/Mapping/EntityListenerResolverTest.php index cca629b9401..878ab11379c 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/EntityListenerResolverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/EntityListenerResolverTest.php @@ -16,7 +16,7 @@ class EntityListenerResolverTest extends OrmTestCase */ private $resolver; - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->resolver = new DefaultEntityListenerResolver(); @@ -74,7 +74,7 @@ public function testClearAll() $this->assertInstanceOf($className1, $obj1); $this->assertInstanceOf($className2, $obj2); - + $this->assertSame($obj1, $this->resolver->resolve($className1)); $this->assertSame($obj2, $this->resolver->resolve($className2)); @@ -82,17 +82,15 @@ public function testClearAll() $this->assertInstanceOf($className1, $this->resolver->resolve($className1)); $this->assertInstanceOf($className2, $this->resolver->resolve($className2)); - + $this->assertNotSame($obj1, $this->resolver->resolve($className1)); $this->assertNotSame($obj2, $this->resolver->resolve($className2)); } - /** - * @expectedException InvalidArgumentException - * @expectedExceptionMessage An object was expected, but got "string". - */ public function testRegisterStringException() { + $this->expectException('InvalidArgumentException'); + $this->expectExceptionMessage('An object was expected, but got "string".'); $this->resolver->register('CompanyContractListener'); } } diff --git a/tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php index fbd22a1a5ce..5a30fc36f03 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php @@ -35,12 +35,10 @@ public function testinvalidEntityOrMappedSuperClassShouldMentionParentClasses() self::assertInstanceOf(ClassMetadata::class, $this->createClassMetadata(DDC889Class::class)); } - /** - * @expectedException Doctrine\ORM\Cache\CacheException - * @expectedExceptionMessage Entity association field "Doctrine\Tests\ORM\Mapping\PHPSLC#foo" not configured as part of the second-level cache. - */ public function testFailingSecondLevelCacheAssociation() { + $this->expectException('Doctrine\ORM\Cache\CacheException'); + $this->expectExceptionMessage('Entity association field "Doctrine\Tests\ORM\Mapping\PHPSLC#foo" not configured as part of the second-level cache.'); $mappingDriver = $this->_loadDriver(); $class = new ClassMetadata(Mapping\PHPSLC::class); diff --git a/tests/Doctrine/Tests/ORM/Mapping/QuoteStrategyTest.php b/tests/Doctrine/Tests/ORM/Mapping/QuoteStrategyTest.php index c264e98e7b3..37ff16d4dea 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/QuoteStrategyTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/QuoteStrategyTest.php @@ -28,7 +28,7 @@ class QuoteStrategyTest extends OrmTestCase */ private $platform; - protected function setUp() + protected function setUp() : void { parent::setUp(); $em = $this->_getTestEntityManager(); diff --git a/tests/Doctrine/Tests/ORM/Mapping/Symfony/AbstractDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/Symfony/AbstractDriverTest.php index c905929a7e6..99e2d0230fb 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/Symfony/AbstractDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/Symfony/AbstractDriverTest.php @@ -63,13 +63,13 @@ public function testFindMappingNamespaceNotFound() $driver->getLocator()->findMappingFile('MyOtherNamespace\MySubnamespace\Entity\Foo'); } - protected function setUp() + protected function setUp() : void { $this->dir = sys_get_temp_dir().'/abstract_driver_test'; @mkdir($this->dir, 0777, true); } - protected function tearDown() + protected function tearDown() : void { $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->dir), \RecursiveIteratorIterator::CHILD_FIRST); diff --git a/tests/Doctrine/Tests/ORM/Mapping/Symfony/YamlDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/Symfony/YamlDriverTest.php index f167132f6bc..f0b4decdfcf 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/Symfony/YamlDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/Symfony/YamlDriverTest.php @@ -20,7 +20,7 @@ protected function getFileExtension() protected function getDriver(array $paths = []) { $driver = new SimplifiedYamlDriver(array_flip($paths)); - $this->expectDeprecationMessage('YAML mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to annotation or XML driver.'); + $this->expectDeprecationMessageSame('YAML mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to annotation or XML driver.'); return $driver; } diff --git a/tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php index 8c6d562eac6..30180a9909b 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php @@ -42,12 +42,10 @@ public function testClassTableInheritanceDiscriminatorMap() $this->assertEquals($expectedMap, $class->discriminatorMap); } - /** - * @expectedException \Doctrine\ORM\Cache\CacheException - * @expectedExceptionMessage Entity association field "Doctrine\Tests\ORM\Mapping\XMLSLC#foo" not configured as part of the second-level cache. - */ public function testFailingSecondLevelCacheAssociation() { + $this->expectException('Doctrine\ORM\Cache\CacheException'); + $this->expectExceptionMessage('Entity association field "Doctrine\Tests\ORM\Mapping\XMLSLC#foo" not configured as part of the second-level cache.'); $mappingDriver = $this->_loadDriver(); $class = new ClassMetadata(XMLSLC::class); @@ -137,12 +135,11 @@ public function testEmbeddedMapping() /** * @group DDC-1468 - * - * @expectedException \Doctrine\Persistence\Mapping\MappingException - * @expectedExceptionMessage Invalid mapping file 'Doctrine.Tests.Models.Generic.SerializationModel.dcm.xml' for class 'Doctrine\Tests\Models\Generic\SerializationModel'. */ public function testInvalidMappingFileException() { + $this->expectException('Doctrine\Persistence\Mapping\MappingException'); + $this->expectExceptionMessage('Invalid mapping file \'Doctrine.Tests.Models.Generic.SerializationModel.dcm.xml\' for class \'Doctrine\Tests\Models\Generic\SerializationModel\'.'); $this->createClassMetadata(SerializationModel::class); } @@ -211,11 +208,11 @@ public function testManyToManyDefaultOrderByAsc() : void /** * @group DDC-889 - * @expectedException \Doctrine\Persistence\Mapping\MappingException - * @expectedExceptionMessage Invalid mapping file 'Doctrine.Tests.Models.DDC889.DDC889Class.dcm.xml' for class 'Doctrine\Tests\Models\DDC889\DDC889Class'. */ public function testinvalidEntityOrMappedSuperClassShouldMentionParentClasses() { + $this->expectException('Doctrine\Persistence\Mapping\MappingException'); + $this->expectExceptionMessage('Invalid mapping file \'Doctrine.Tests.Models.DDC889.DDC889Class.dcm.xml\' for class \'Doctrine\Tests\Models\DDC889\DDC889Class\'.'); $this->createClassMetadata(DDC889Class::class); } } diff --git a/tests/Doctrine/Tests/ORM/Mapping/YamlMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/YamlMappingDriverTest.php index fc97d29d33c..1edc4a1010e 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/YamlMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/YamlMappingDriverTest.php @@ -51,12 +51,11 @@ public function testJoinTablesWithMappedSuperclassForYamlDriver() /** * @group DDC-1468 - * - * @expectedException Doctrine\Persistence\Mapping\MappingException - * @expectedExceptionMessage Invalid mapping file 'Doctrine.Tests.Models.Generic.SerializationModel.dcm.yml' for class 'Doctrine\Tests\Models\Generic\SerializationModel'. */ public function testInvalidMappingFileException() { + $this->expectException('Doctrine\Persistence\Mapping\MappingException'); + $this->expectExceptionMessage('Invalid mapping file \'Doctrine.Tests.Models.Generic.SerializationModel.dcm.yml\' for class \'Doctrine\Tests\Models\Generic\SerializationModel\'.'); $this->createClassMetadata(SerializationModel::class); } @@ -86,9 +85,8 @@ public function testSpacesShouldBeIgnoredWhenUseExplode() public function testDeprecation() : void { $this->createClassMetadata(DDC2069Entity::class); - $this->expectDeprecationMessage('YAML mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to annotation or XML driver.'); + $this->expectDeprecationMessageSame('YAML mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to annotation or XML driver.'); } - } class DDC2069Entity diff --git a/tests/Doctrine/Tests/ORM/Performance/SecondLevelCacheTest.php b/tests/Doctrine/Tests/ORM/Performance/SecondLevelCacheTest.php index f954d4f4791..568bd56b8d2 100644 --- a/tests/Doctrine/Tests/ORM/Performance/SecondLevelCacheTest.php +++ b/tests/Doctrine/Tests/ORM/Performance/SecondLevelCacheTest.php @@ -15,7 +15,7 @@ */ class SecondLevelCacheTest extends OrmFunctionalTestCase { - protected function setUp() + protected function setUp() : void { parent::useModelSet('cache'); parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/PersistentCollectionTest.php b/tests/Doctrine/Tests/ORM/PersistentCollectionTest.php index bfee130f0b5..b8a1523cb04 100644 --- a/tests/Doctrine/Tests/ORM/PersistentCollectionTest.php +++ b/tests/Doctrine/Tests/ORM/PersistentCollectionTest.php @@ -30,7 +30,7 @@ class PersistentCollectionTest extends OrmTestCase */ private $_emMock; - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterCompositeTypeParametersTest.php b/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterCompositeTypeParametersTest.php index 000eb637eb2..e427318ad8d 100644 --- a/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterCompositeTypeParametersTest.php +++ b/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterCompositeTypeParametersTest.php @@ -24,7 +24,7 @@ class BasicEntityPersisterCompositeTypeParametersTest extends OrmTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterCompositeTypeSqlTest.php b/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterCompositeTypeSqlTest.php index 9392b8ee507..2d7592d1c4b 100644 --- a/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterCompositeTypeSqlTest.php +++ b/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterCompositeTypeSqlTest.php @@ -22,7 +22,7 @@ class BasicEntityPersisterCompositeTypeSqlTest extends OrmTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); @@ -48,11 +48,9 @@ public function testSelectConditionStatementNeqNull() $this->assertEquals('t0.admin1 IS NOT NULL AND t0.country IS NOT NULL', $statement); } - /** - * @expectedException Doctrine\ORM\ORMException - */ public function testSelectConditionStatementIn() { + $this->expectException('Doctrine\ORM\ORMException'); $this->_persister->getSelectConditionStatementSQL('admin1', [], [], Comparison::IN); } } diff --git a/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterTypeValueSqlTest.php b/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterTypeValueSqlTest.php index ba1d18051e1..d721c25cc41 100644 --- a/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterTypeValueSqlTest.php +++ b/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterTypeValueSqlTest.php @@ -27,7 +27,7 @@ class BasicEntityPersisterTypeValueSqlTest extends OrmTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Persisters/JoinedSubclassPersisterTest.php b/tests/Doctrine/Tests/ORM/Persisters/JoinedSubclassPersisterTest.php index 4a4cec244a4..a4a43cdd3c2 100644 --- a/tests/Doctrine/Tests/ORM/Persisters/JoinedSubclassPersisterTest.php +++ b/tests/Doctrine/Tests/ORM/Persisters/JoinedSubclassPersisterTest.php @@ -26,7 +26,7 @@ class JoinedSubClassPersisterTest extends OrmTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/ORM/Proxy/ProxyFactoryTest.php b/tests/Doctrine/Tests/ORM/Proxy/ProxyFactoryTest.php index c82cd687996..666edc9a465 100644 --- a/tests/Doctrine/Tests/ORM/Proxy/ProxyFactoryTest.php +++ b/tests/Doctrine/Tests/ORM/Proxy/ProxyFactoryTest.php @@ -46,7 +46,7 @@ class ProxyFactoryTest extends OrmTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->connectionMock = new ConnectionMock([], new DriverMock()); diff --git a/tests/Doctrine/Tests/ORM/Query/CustomTreeWalkersJoinTest.php b/tests/Doctrine/Tests/ORM/Query/CustomTreeWalkersJoinTest.php index 9bc5bf5a0dc..b36e713b1c9 100644 --- a/tests/Doctrine/Tests/ORM/Query/CustomTreeWalkersJoinTest.php +++ b/tests/Doctrine/Tests/ORM/Query/CustomTreeWalkersJoinTest.php @@ -18,7 +18,7 @@ class CustomTreeWalkersJoinTest extends OrmTestCase { private $em; - protected function setUp() + protected function setUp() : void { $this->em = $this->_getTestEntityManager(); } diff --git a/tests/Doctrine/Tests/ORM/Query/CustomTreeWalkersTest.php b/tests/Doctrine/Tests/ORM/Query/CustomTreeWalkersTest.php index 4c2898141a7..4b8d525bad6 100644 --- a/tests/Doctrine/Tests/ORM/Query/CustomTreeWalkersTest.php +++ b/tests/Doctrine/Tests/ORM/Query/CustomTreeWalkersTest.php @@ -20,7 +20,7 @@ class CustomTreeWalkersTest extends OrmTestCase { private $_em; - protected function setUp() + protected function setUp() : void { $this->_em = $this->_getTestEntityManager(); } diff --git a/tests/Doctrine/Tests/ORM/Query/DeleteSqlGenerationTest.php b/tests/Doctrine/Tests/ORM/Query/DeleteSqlGenerationTest.php index ee5f98ac524..0e4cd6aeb0a 100644 --- a/tests/Doctrine/Tests/ORM/Query/DeleteSqlGenerationTest.php +++ b/tests/Doctrine/Tests/ORM/Query/DeleteSqlGenerationTest.php @@ -21,7 +21,8 @@ class DeleteSqlGenerationTest extends OrmTestCase { private $_em; - protected function setUp() { + protected function setUp() : void + { $this->_em = $this->_getTestEntityManager(); } diff --git a/tests/Doctrine/Tests/ORM/Query/ExprTest.php b/tests/Doctrine/Tests/ORM/Query/ExprTest.php index 37a4b70a657..de2273f3a82 100644 --- a/tests/Doctrine/Tests/ORM/Query/ExprTest.php +++ b/tests/Doctrine/Tests/ORM/Query/ExprTest.php @@ -25,7 +25,7 @@ class ExprTest extends OrmTestCase */ private $_expr; - protected function setUp() + protected function setUp() : void { $this->_em = $this->_getTestEntityManager(); $this->_expr = new Expr; @@ -334,11 +334,9 @@ public function testOrderByAsc() $this->assertEquals('u.username ASC', (string) $orderExpr); } - /** - * @expectedException \InvalidArgumentException - */ public function testAddThrowsException() { + $this->expectException('InvalidArgumentException'); $orExpr = $this->_expr->orX(); $orExpr->add($this->_expr->quot(5, 2)); } diff --git a/tests/Doctrine/Tests/ORM/Query/FilterCollectionTest.php b/tests/Doctrine/Tests/ORM/Query/FilterCollectionTest.php index 0e47f6e82d6..22aec4007a9 100644 --- a/tests/Doctrine/Tests/ORM/Query/FilterCollectionTest.php +++ b/tests/Doctrine/Tests/ORM/Query/FilterCollectionTest.php @@ -18,7 +18,7 @@ class FilterCollectionTest extends OrmTestCase */ private $em; - protected function setUp() + protected function setUp() : void { $this->em = $this->_getTestEntityManager(); $this->em->getConfiguration()->addFilter('testFilter', MyFilter::class); @@ -63,11 +63,9 @@ public function testIsEnabled() $this->assertTrue($filterCollection->isEnabled('testFilter')); } - /** - * @expectedException InvalidArgumentException - */ public function testGetFilterInvalidArgument() { + $this->expectException('InvalidArgumentException'); $filterCollection = $this->em->getFilters(); $filterCollection->getFilter('testFilter'); } diff --git a/tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php b/tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php index 50a4653b3a1..35ad12d051e 100644 --- a/tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php +++ b/tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php @@ -15,7 +15,7 @@ class LanguageRecognitionTest extends OrmTestCase */ private $_em; - protected function setUp() + protected function setUp() : void { $this->_em = $this->_getTestEntityManager(); } diff --git a/tests/Doctrine/Tests/ORM/Query/LexerTest.php b/tests/Doctrine/Tests/ORM/Query/LexerTest.php index 904b8978786..8140d621d1f 100644 --- a/tests/Doctrine/Tests/ORM/Query/LexerTest.php +++ b/tests/Doctrine/Tests/ORM/Query/LexerTest.php @@ -7,9 +7,10 @@ class LexerTest extends OrmTestCase { - //private $_lexer; + private $_lexer; - protected function setUp() { + protected function setUp() : void + { } /** diff --git a/tests/Doctrine/Tests/ORM/Query/ParserResultTest.php b/tests/Doctrine/Tests/ORM/Query/ParserResultTest.php index 1b74654430e..c0b33bbc0dd 100644 --- a/tests/Doctrine/Tests/ORM/Query/ParserResultTest.php +++ b/tests/Doctrine/Tests/ORM/Query/ParserResultTest.php @@ -11,7 +11,7 @@ class ParserResultTest extends TestCase { public $parserResult; - public function setUp() + protected function setUp() : void { $this->parserResult = new ParserResult(); } @@ -39,7 +39,7 @@ public function testGetSqlParameterPosition() public function testGetParameterMappings() { - $this->assertInternalType('array', $this->parserResult->getParameterMappings()); + $this->assertIsArray($this->parserResult->getParameterMappings()); $this->parserResult->addParameterMapping(1, 1); $this->parserResult->addParameterMapping(1, 2); diff --git a/tests/Doctrine/Tests/ORM/Query/QueryExpressionVisitorTest.php b/tests/Doctrine/Tests/ORM/Query/QueryExpressionVisitorTest.php index 27dce7d6d95..2a8832f0c49 100644 --- a/tests/Doctrine/Tests/ORM/Query/QueryExpressionVisitorTest.php +++ b/tests/Doctrine/Tests/ORM/Query/QueryExpressionVisitorTest.php @@ -26,7 +26,7 @@ class QueryExpressionVisitorTest extends TestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { $this->visitor = new QueryExpressionVisitor(['o','p']); } diff --git a/tests/Doctrine/Tests/ORM/Query/QueryTest.php b/tests/Doctrine/Tests/ORM/Query/QueryTest.php index 57492eb80f1..a3dac3500b6 100644 --- a/tests/Doctrine/Tests/ORM/Query/QueryTest.php +++ b/tests/Doctrine/Tests/ORM/Query/QueryTest.php @@ -7,6 +7,7 @@ use Doctrine\Common\Collections\ArrayCollection; use Doctrine\DBAL\Types\Type; use Doctrine\ORM\Internal\Hydration\IterableResult; +use Doctrine\ORM\Query; use Doctrine\ORM\Query\Parameter; use Doctrine\ORM\Query\QueryException; use Doctrine\ORM\UnitOfWork; @@ -17,13 +18,14 @@ use Doctrine\Tests\Models\CMS\CmsUser; use Doctrine\Tests\Models\Generic\DateTimeModel; use Doctrine\Tests\OrmTestCase; +use ReflectionClass; class QueryTest extends OrmTestCase { /** @var EntityManagerMock */ protected $_em; - protected function setUp() + protected function setUp() : void { $this->_em = $this->_getTestEntityManager(); } @@ -132,20 +134,16 @@ public function testQueryDefaultResultCache() $this->assertSame($this->_em->getConfiguration()->getResultCacheImpl(), $q->getQueryCacheProfile()->getResultCacheDriver()); } - /** - * @expectedException Doctrine\ORM\Query\QueryException - **/ public function testIterateWithNoDistinctAndWrongSelectClause() { + $this->expectException('Doctrine\ORM\Query\QueryException'); $q = $this->_em->createQuery("select u, a from Doctrine\Tests\Models\CMS\CmsUser u LEFT JOIN u.articles a"); $q->iterate(); } - /** - * @expectedException Doctrine\ORM\Query\QueryException - **/ public function testIterateWithNoDistinctAndWithValidSelectClause() { + $this->expectException('Doctrine\ORM\Query\QueryException'); $q = $this->_em->createQuery("select u from Doctrine\Tests\Models\CMS\CmsUser u LEFT JOIN u.articles a"); $q->iterate(); } @@ -400,7 +398,10 @@ public function testResultCacheProfileCanBeRemovedViaSetter() : void $query->enableResultCache(); $query->setResultCacheProfile(); - self::assertAttributeSame(null, '_queryCacheProfile', $query); + $class = new ReflectionClass(Query::class); + $property = $class->getProperty('_queryCacheProfile'); + $property->setAccessible(true); + self::assertNull($property->getValue($query)); } /** @group 7527 */ diff --git a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php index 92ba2fe0dd3..c26a71aeecc 100644 --- a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php +++ b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php @@ -26,7 +26,7 @@ class SelectSqlGenerationTest extends OrmTestCase { private $_em; - protected function setUp() + protected function setUp() : void { $this->_em = $this->_getTestEntityManager(); } @@ -910,11 +910,9 @@ public function testOrderBySupportsSingleValuedPathExpressionOwningSide() ); } - /** - * @expectedException \Doctrine\ORM\Query\QueryException - */ public function testOrderBySupportsSingleValuedPathExpressionInverseSide() { + $this->expectException('Doctrine\ORM\Query\QueryException'); $q = $this->_em->createQuery("select u from Doctrine\Tests\Models\CMS\CmsUser u order by u.address"); $q->getSQL(); } diff --git a/tests/Doctrine/Tests/ORM/Query/SqlWalkerTest.php b/tests/Doctrine/Tests/ORM/Query/SqlWalkerTest.php index e23ee0117f8..e2f924f2560 100644 --- a/tests/Doctrine/Tests/ORM/Query/SqlWalkerTest.php +++ b/tests/Doctrine/Tests/ORM/Query/SqlWalkerTest.php @@ -22,7 +22,7 @@ class SqlWalkerTest extends OrmTestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { $this->sqlWalker = new SqlWalker(new Query($this->_getTestEntityManager()), new ParserResult(), []); } diff --git a/tests/Doctrine/Tests/ORM/Query/UpdateSqlGenerationTest.php b/tests/Doctrine/Tests/ORM/Query/UpdateSqlGenerationTest.php index 7044929e940..5fd200c26fd 100644 --- a/tests/Doctrine/Tests/ORM/Query/UpdateSqlGenerationTest.php +++ b/tests/Doctrine/Tests/ORM/Query/UpdateSqlGenerationTest.php @@ -24,7 +24,8 @@ class UpdateSqlGenerationTest extends OrmTestCase { private $_em; - protected function setUp() { + protected function setUp() : void + { if (DBALType::hasType('negative_to_positive')) { DBALType::overrideType('negative_to_positive', NegativeToPositiveType::class); } else { diff --git a/tests/Doctrine/Tests/ORM/QueryBuilderTest.php b/tests/Doctrine/Tests/ORM/QueryBuilderTest.php index 17d10f4b2dc..e2f10e3f624 100644 --- a/tests/Doctrine/Tests/ORM/QueryBuilderTest.php +++ b/tests/Doctrine/Tests/ORM/QueryBuilderTest.php @@ -30,7 +30,7 @@ class QueryBuilderTest extends OrmTestCase */ private $_em; - protected function setUp() + protected function setUp() : void { $this->_em = $this->_getTestEntityManager(); } diff --git a/tests/Doctrine/Tests/ORM/Repository/DefaultRepositoryFactoryTest.php b/tests/Doctrine/Tests/ORM/Repository/DefaultRepositoryFactoryTest.php index 85a63404618..bb2b5a78fb3 100644 --- a/tests/Doctrine/Tests/ORM/Repository/DefaultRepositoryFactoryTest.php +++ b/tests/Doctrine/Tests/ORM/Repository/DefaultRepositoryFactoryTest.php @@ -35,7 +35,7 @@ class DefaultRepositoryFactoryTest extends TestCase /** * {@inheritDoc} */ - protected function setUp() + protected function setUp() : void { $this->configuration = $this->createMock(Configuration::class); $this->entityManager = $this->createEntityManager(); diff --git a/tests/Doctrine/Tests/ORM/Tools/AttachEntityListenersListenerTest.php b/tests/Doctrine/Tests/ORM/Tools/AttachEntityListenersListenerTest.php index db4da0b5d88..b1b1d4ab738 100644 --- a/tests/Doctrine/Tests/ORM/Tools/AttachEntityListenersListenerTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/AttachEntityListenersListenerTest.php @@ -24,7 +24,7 @@ class AttachEntityListenersListenerTest extends OrmTestCase */ private $factory; - public function setUp() + protected function setUp() : void { $this->listener = new AttachEntityListenersListener(); $driver = $this->createAnnotationDriver(); @@ -90,12 +90,10 @@ public function testAttachToExistingEntityListeners() $this->assertEquals(AttachEntityListenersListenerTestListener2::class, $metadata->entityListeners['postPersist'][1]['class']); } - /** - * @expectedException \Doctrine\ORM\Mapping\MappingException - * @expectedExceptionMessage Entity Listener "Doctrine\Tests\ORM\Tools\AttachEntityListenersListenerTestListener#postPersist()" in "Doctrine\Tests\ORM\Tools\AttachEntityListenersListenerTestFooEntity" was already declared, but it must be declared only once. - */ public function testDuplicateEntityListenerException() { + $this->expectException('Doctrine\ORM\Mapping\MappingException'); + $this->expectExceptionMessage('Entity Listener "Doctrine\Tests\ORM\Tools\AttachEntityListenersListenerTestListener#postPersist()" in "Doctrine\Tests\ORM\Tools\AttachEntityListenersListenerTestFooEntity" was already declared, but it must be declared only once.'); $this->listener->addEntityListener( AttachEntityListenersListenerTestFooEntity::class, AttachEntityListenersListenerTestListener::class, diff --git a/tests/Doctrine/Tests/ORM/Tools/Console/Command/ClearCacheCollectionRegionCommandTest.php b/tests/Doctrine/Tests/ORM/Tools/Console/Command/ClearCacheCollectionRegionCommandTest.php index f8c17b318bf..c105be11287 100644 --- a/tests/Doctrine/Tests/ORM/Tools/Console/Command/ClearCacheCollectionRegionCommandTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/Console/Command/ClearCacheCollectionRegionCommandTest.php @@ -25,7 +25,7 @@ class ClearCacheCollectionRegionCommandTest extends OrmFunctionalTestCase */ private $command; - protected function setUp() + protected function setUp() : void { $this->enableSecondLevelCache(); parent::setUp(); @@ -50,7 +50,7 @@ public function testClearAllRegion() ['decorated' => false] ); - self::assertContains(' // Clearing all second-level cache collection regions', $tester->getDisplay()); + self::assertStringContainsString(' // Clearing all second-level cache collection regions', $tester->getDisplay()); } public function testClearByOwnerEntityClassName() @@ -67,7 +67,7 @@ public function testClearByOwnerEntityClassName() ['decorated' => false] ); - self::assertContains( + self::assertStringContainsString( ' // Clearing second-level cache for collection "Doctrine\Tests\Models\Cache\State#cities"', $tester->getDisplay() ); @@ -88,12 +88,12 @@ public function testClearCacheEntryName() ['decorated' => false] ); - self::assertContains( + self::assertStringContainsString( ' // Clearing second-level cache entry for collection "Doctrine\Tests\Models\Cache\State#cities" owner', $tester->getDisplay() ); - self::assertContains(' // entity identified by "1"', $tester->getDisplay()); + self::assertStringContainsString(' // entity identified by "1"', $tester->getDisplay()); } public function testFlushRegionName() @@ -111,7 +111,7 @@ public function testFlushRegionName() ['decorated' => false] ); - self::assertContains( + self::assertStringContainsString( ' // Flushing cache provider configured for "Doctrine\Tests\Models\Cache\State#cities"', $tester->getDisplay() ); diff --git a/tests/Doctrine/Tests/ORM/Tools/Console/Command/ClearCacheEntityRegionCommandTest.php b/tests/Doctrine/Tests/ORM/Tools/Console/Command/ClearCacheEntityRegionCommandTest.php index b1d8d386b2f..f7493e6eb87 100644 --- a/tests/Doctrine/Tests/ORM/Tools/Console/Command/ClearCacheEntityRegionCommandTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/Console/Command/ClearCacheEntityRegionCommandTest.php @@ -25,7 +25,7 @@ class ClearCacheEntityRegionCommandTest extends OrmFunctionalTestCase */ private $command; - protected function setUp() + protected function setUp() : void { $this->enableSecondLevelCache(); parent::setUp(); @@ -50,7 +50,7 @@ public function testClearAllRegion() ['decorated' => false] ); - self::assertContains(' // Clearing all second-level cache entity regions', $tester->getDisplay()); + self::assertStringContainsString(' // Clearing all second-level cache entity regions', $tester->getDisplay()); } public function testClearByEntityClassName() @@ -66,7 +66,7 @@ public function testClearByEntityClassName() ['decorated' => false] ); - self::assertContains( + self::assertStringContainsString( ' // Clearing second-level cache for entity "Doctrine\Tests\Models\Cache\Country"', $tester->getDisplay() ); @@ -86,12 +86,12 @@ public function testClearCacheEntryName() ['decorated' => false] ); - self::assertContains( + self::assertStringContainsString( ' // Clearing second-level cache entry for entity "Doctrine\Tests\Models\Cache\Country" identified by', $tester->getDisplay() ); - self::assertContains(' // "1"', $tester->getDisplay()); + self::assertStringContainsString(' // "1"', $tester->getDisplay()); } public function testFlushRegionName() @@ -108,7 +108,7 @@ public function testFlushRegionName() ['decorated' => false] ); - self::assertContains( + self::assertStringContainsString( ' // Flushing cache provider configured for entity named "Doctrine\Tests\Models\Cache\Country"', $tester->getDisplay() ); diff --git a/tests/Doctrine/Tests/ORM/Tools/Console/Command/ClearCacheQueryRegionCommandTest.php b/tests/Doctrine/Tests/ORM/Tools/Console/Command/ClearCacheQueryRegionCommandTest.php index 1d761260cb7..61802ea6e96 100644 --- a/tests/Doctrine/Tests/ORM/Tools/Console/Command/ClearCacheQueryRegionCommandTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/Console/Command/ClearCacheQueryRegionCommandTest.php @@ -24,7 +24,7 @@ class ClearCacheQueryRegionCommandTest extends OrmFunctionalTestCase */ private $command; - protected function setUp() + protected function setUp() : void { $this->enableSecondLevelCache(); parent::setUp(); @@ -49,7 +49,7 @@ public function testClearAllRegion() ['decorated' => false] ); - self::assertContains(' // Clearing all second-level cache query regions', $tester->getDisplay()); + self::assertStringContainsString(' // Clearing all second-level cache query regions', $tester->getDisplay()); } public function testClearDefaultRegionName() @@ -65,7 +65,7 @@ public function testClearDefaultRegionName() ['decorated' => false] ); - self::assertContains( + self::assertStringContainsString( ' // Clearing second-level cache query region named "query_cache_region"', $tester->getDisplay() ); @@ -84,7 +84,7 @@ public function testClearByRegionName() ['decorated' => false] ); - self::assertContains( + self::assertStringContainsString( ' // Clearing second-level cache query region named "my_region"', $tester->getDisplay() ); @@ -104,7 +104,7 @@ public function testFlushRegionName() ['decorated' => false] ); - self::assertContains( + self::assertStringContainsString( ' // Flushing cache provider configured for second-level cache query region named "my_region"', $tester->getDisplay() ); diff --git a/tests/Doctrine/Tests/ORM/Tools/Console/Command/GenerateRepositoriesCommandTest.php b/tests/Doctrine/Tests/ORM/Tools/Console/Command/GenerateRepositoriesCommandTest.php index bf7d823fc37..b487cba5668 100644 --- a/tests/Doctrine/Tests/ORM/Tools/Console/Command/GenerateRepositoriesCommandTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/Console/Command/GenerateRepositoriesCommandTest.php @@ -28,7 +28,7 @@ class GenerateRepositoriesCommandTest extends OrmFunctionalTestCase /** * @inheritdoc */ - protected function setUp() + protected function setUp() : void { parent::setUp(); @@ -47,7 +47,7 @@ protected function setUp() /** * @inheritdoc */ - public function tearDown() + public function tearDown() : void { $dirs = []; @@ -172,7 +172,7 @@ public function testNoMetadataClassesToProcess() : void ] ); - self::assertContains('Command orm:generate-repositories is deprecated and will be removed in Doctrine ORM 3.0.', $tester->getDisplay()); - self::assertContains('[OK] No Metadata Classes to process.', $tester->getDisplay()); + self::assertStringContainsString('Command orm:generate-repositories is deprecated and will be removed in Doctrine ORM 3.0.', $tester->getDisplay()); + self::assertStringContainsString('[OK] No Metadata Classes to process.', $tester->getDisplay()); } } diff --git a/tests/Doctrine/Tests/ORM/Tools/Console/Command/InfoCommandTest.php b/tests/Doctrine/Tests/ORM/Tools/Console/Command/InfoCommandTest.php index 0e8c613c519..2139017b53c 100644 --- a/tests/Doctrine/Tests/ORM/Tools/Console/Command/InfoCommandTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/Console/Command/InfoCommandTest.php @@ -32,7 +32,7 @@ class InfoCommandTest extends OrmFunctionalTestCase */ private $tester; - protected function setUp() + protected function setUp() : void { parent::setUp(); @@ -49,8 +49,8 @@ public function testListAllClasses() { $this->tester->execute(['command' => $this->command->getName()]); - self::assertContains(AttractionInfo::class, $this->tester->getDisplay()); - self::assertContains(City::class, $this->tester->getDisplay()); + self::assertStringContainsString(AttractionInfo::class, $this->tester->getDisplay()); + self::assertStringContainsString(City::class, $this->tester->getDisplay()); } public function testEmptyEntityClassNames() : void @@ -77,12 +77,12 @@ public function testEmptyEntityClassNames() : void $tester->execute(['command' => $command->getName()]); - self::assertContains( + self::assertStringContainsString( ' ! [CAUTION] You do not have any mapped Doctrine ORM entities according to the current configuration', $tester->getDisplay() ); - self::assertContains( + self::assertStringContainsString( ' ! If you have entities or mapping files you should check your mapping configuration for errors.', $tester->getDisplay() ); @@ -116,7 +116,7 @@ public function testInvalidEntityClassMetadata() : void $tester->execute(['command' => $command->getName()]); - self::assertContains('[FAIL] InvalidEntity', $tester->getDisplay()); - self::assertContains('exception message', $tester->getDisplay()); + self::assertStringContainsString('[FAIL] InvalidEntity', $tester->getDisplay()); + self::assertStringContainsString('exception message', $tester->getDisplay()); } } diff --git a/tests/Doctrine/Tests/ORM/Tools/Console/Command/MappingDescribeCommandTest.php b/tests/Doctrine/Tests/ORM/Tools/Console/Command/MappingDescribeCommandTest.php index f73456b47ab..156b9aee5f4 100644 --- a/tests/Doctrine/Tests/ORM/Tools/Console/Command/MappingDescribeCommandTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/Console/Command/MappingDescribeCommandTest.php @@ -32,7 +32,7 @@ class MappingDescribeCommandTest extends OrmFunctionalTestCase */ private $tester; - protected function setUp() + protected function setUp() : void { parent::setUp(); @@ -55,16 +55,14 @@ public function testShowSpecificFuzzySingle() $display = $this->tester->getDisplay(); - self::assertContains(AttractionInfo::class, $display); - self::assertContains('Root entity name', $display); + self::assertStringContainsString(AttractionInfo::class, $display); + self::assertStringContainsString('Root entity name', $display); } - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage possible matches - */ public function testShowSpecificFuzzyAmbiguous() { + $this->expectException('InvalidArgumentException'); + $this->expectExceptionMessage('possible matches'); $this->tester->execute( [ 'command' => $this->command->getName(), @@ -73,12 +71,10 @@ public function testShowSpecificFuzzyAmbiguous() ); } - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Could not find any mapped Entity classes matching "AttractionFooBar" - */ public function testShowSpecificNotFound() { + $this->expectException('InvalidArgumentException'); + $this->expectExceptionMessage('Could not find any mapped Entity classes matching "AttractionFooBar"'); $this->tester->execute( [ 'command' => $this->command->getName(), diff --git a/tests/Doctrine/Tests/ORM/Tools/Console/Command/RunDqlCommandTest.php b/tests/Doctrine/Tests/ORM/Tools/Console/Command/RunDqlCommandTest.php index 552c678739c..7ffc15fe84a 100644 --- a/tests/Doctrine/Tests/ORM/Tools/Console/Command/RunDqlCommandTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/Console/Command/RunDqlCommandTest.php @@ -32,7 +32,7 @@ class RunDqlCommandTest extends OrmFunctionalTestCase */ private $tester; - protected function setUp() + protected function setUp() : void { $this->useModelSet('generic'); @@ -67,7 +67,7 @@ public function testWillRunQuery() ) ); - self::assertContains(DateTimeModel::class, $this->tester->getDisplay()); + self::assertStringContainsString(DateTimeModel::class, $this->tester->getDisplay()); } public function testWillShowQuery() diff --git a/tests/Doctrine/Tests/ORM/Tools/ConvertDoctrine1SchemaTest.php b/tests/Doctrine/Tests/ORM/Tools/ConvertDoctrine1SchemaTest.php index 291228687fb..fe7959ca36f 100644 --- a/tests/Doctrine/Tests/ORM/Tools/ConvertDoctrine1SchemaTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/ConvertDoctrine1SchemaTest.php @@ -83,7 +83,7 @@ public function testTest() $this->assertHasDeprecationMessages(); } - public function tearDown() + public function tearDown() : void { @unlink(__DIR__ . '/convert/User.dcm.yml'); @unlink(__DIR__ . '/convert/Profile.dcm.yml'); diff --git a/tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php b/tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php index 58e19db209b..37cb4c1c782 100644 --- a/tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php @@ -26,7 +26,7 @@ class EntityGeneratorTest extends OrmTestCase private $_tmpDir; private $_namespace; - public function setUp() + protected function setUp() : void { $this->_namespace = uniqid("doctrine_"); $this->_tmpDir = \sys_get_temp_dir(); @@ -40,7 +40,7 @@ public function setUp() $this->_generator->setFieldVisibility(EntityGenerator::FIELD_VISIBLE_PROTECTED); } - public function tearDown() + public function tearDown() : void { $ri = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->_tmpDir . '/' . $this->_namespace)); foreach ($ri AS $file) { @@ -247,7 +247,7 @@ public function testEmbeddedEntityWithNamedColumnPrefix() $docComment = $refClass->getProperty('testEmbedded')->getDocComment(); $needle = sprintf('@Embedded(class="%s", columnPrefix="%s")', $testMetadata->name, $columnPrefix); - self::assertContains($needle, $docComment); + self::assertStringContainsString($needle, $docComment); } /** @@ -263,7 +263,7 @@ public function testEmbeddedEntityWithoutColumnPrefix() $docComment = $refClass->getProperty('testEmbedded')->getDocComment(); $needle = sprintf('@Embedded(class="%s", columnPrefix=false)', $testMetadata->name); - self::assertContains($needle, $docComment); + self::assertStringContainsString($needle, $docComment); } public function testGeneratedEntityClass() @@ -314,7 +314,7 @@ public function testGeneratedEntityClass() $this->assertInstanceOf($metadata->name, $book->addComment($comment)); $this->assertInstanceOf(ArrayCollection::class, $book->getComments()); $this->assertEquals(new ArrayCollection([$comment]), $book->getComments()); - $this->assertInternalType('boolean', $book->removeComment($comment)); + $this->assertIsBool($book->removeComment($comment)); $this->assertEquals(new ArrayCollection([]), $book->getComments()); $this->newInstance($isbnMetadata); @@ -609,10 +609,13 @@ public function testGenerateEntityWithSequenceGenerator() $reflection = new \ReflectionProperty($metadata->name, 'id'); $docComment = $reflection->getDocComment(); - $this->assertContains('@Id', $docComment); - $this->assertContains('@Column(name="id", type="integer")', $docComment); - $this->assertContains('@GeneratedValue(strategy="SEQUENCE")', $docComment); - $this->assertContains('@SequenceGenerator(sequenceName="DDC1784_ID_SEQ", allocationSize=1, initialValue=2)', $docComment); + $this->assertStringContainsString('@Id', $docComment); + $this->assertStringContainsString('@Column(name="id", type="integer")', $docComment); + $this->assertStringContainsString('@GeneratedValue(strategy="SEQUENCE")', $docComment); + $this->assertStringContainsString( + '@SequenceGenerator(sequenceName="DDC1784_ID_SEQ", allocationSize=1, initialValue=2)', + $docComment + ); } /** @@ -653,11 +656,23 @@ public function testGenerateEntityWithMultipleInverseJoinColumns() $docComment = $property->getDocComment(); //joinColumns - $this->assertContains('@JoinColumn(name="idorcamento", referencedColumnName="idorcamento"),', $docComment); - $this->assertContains('@JoinColumn(name="idunidade", referencedColumnName="idunidade")', $docComment); + $this->assertStringContainsString( + '@JoinColumn(name="idorcamento", referencedColumnName="idorcamento"),', + $docComment + ); + $this->assertStringContainsString( + '@JoinColumn(name="idunidade", referencedColumnName="idunidade")', + $docComment + ); //inverseJoinColumns - $this->assertContains('@JoinColumn(name="idcentrocusto", referencedColumnName="idcentrocusto"),', $docComment); - $this->assertContains('@JoinColumn(name="idpais", referencedColumnName="idpais")', $docComment); + $this->assertStringContainsString( + '@JoinColumn(name="idcentrocusto", referencedColumnName="idcentrocusto"),', + $docComment + ); + $this->assertStringContainsString( + '@JoinColumn(name="idpais", referencedColumnName="idpais")', + $docComment + ); } @@ -1233,7 +1248,7 @@ public function testOptionsAreGeneratedProperly(string $expectedAnnotation, arra $property = new \ReflectionProperty($metadata->name, 'test'); $docComment = $property->getDocComment(); - self::assertContains($expectedAnnotation, $docComment); + self::assertStringContainsString($expectedAnnotation, $docComment); } public function columnOptionsProvider() : array diff --git a/tests/Doctrine/Tests/ORM/Tools/EntityRepositoryGeneratorTest.php b/tests/Doctrine/Tests/ORM/Tools/EntityRepositoryGeneratorTest.php index d020cc6e07c..73f2d40e2df 100644 --- a/tests/Doctrine/Tests/ORM/Tools/EntityRepositoryGeneratorTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/EntityRepositoryGeneratorTest.php @@ -32,7 +32,7 @@ class EntityRepositoryGeneratorTest extends OrmTestCase /** * @inheritdoc */ - public function setUp() + protected function setUp() : void { $this->_namespace = uniqid('doctrine_'); $this->_tmpDir = \sys_get_temp_dir() . DIRECTORY_SEPARATOR . $this->_namespace; @@ -52,7 +52,7 @@ public function setUp() /** * @inheritdoc */ - public function tearDown() + public function tearDown() : void { $dirs = []; diff --git a/tests/Doctrine/Tests/ORM/Tools/Pagination/PaginationTestCase.php b/tests/Doctrine/Tests/ORM/Tools/Pagination/PaginationTestCase.php index a4791cd175e..3cddf5c7a90 100644 --- a/tests/Doctrine/Tests/ORM/Tools/Pagination/PaginationTestCase.php +++ b/tests/Doctrine/Tests/ORM/Tools/Pagination/PaginationTestCase.php @@ -11,7 +11,7 @@ abstract class PaginationTestCase extends OrmTestCase */ public $entityManager; - protected function setUp() + protected function setUp() : void { $this->entityManager = $this->_getTestEntityManager(); } diff --git a/tests/Doctrine/Tests/ORM/Tools/ResolveTargetEntityListenerTest.php b/tests/Doctrine/Tests/ORM/Tools/ResolveTargetEntityListenerTest.php index 910df27f87c..9189e53dec4 100644 --- a/tests/Doctrine/Tests/ORM/Tools/ResolveTargetEntityListenerTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/ResolveTargetEntityListenerTest.php @@ -24,7 +24,7 @@ class ResolveTargetEntityListenerTest extends OrmTestCase */ private $factory; - public function setUp() + protected function setUp() : void { $annotationDriver = $this->createAnnotationDriver(); diff --git a/tests/Doctrine/Tests/ORM/Tools/SchemaValidatorTest.php b/tests/Doctrine/Tests/ORM/Tools/SchemaValidatorTest.php index 682ee896d1a..40f12a72e42 100644 --- a/tests/Doctrine/Tests/ORM/Tools/SchemaValidatorTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/SchemaValidatorTest.php @@ -18,7 +18,7 @@ class SchemaValidatorTest extends OrmTestCase */ private $validator = null; - public function setUp() + protected function setUp() : void { $this->em = $this->_getTestEntityManager(); $this->validator = new SchemaValidator($this->em); diff --git a/tests/Doctrine/Tests/ORM/Tools/SetupTest.php b/tests/Doctrine/Tests/ORM/Tools/SetupTest.php index 99fafe43905..f784eb7b3e8 100644 --- a/tests/Doctrine/Tests/ORM/Tools/SetupTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/SetupTest.php @@ -19,13 +19,13 @@ class SetupTest extends OrmTestCase private $originalAutoloaderCount; private $originalIncludePath; - public function setUp() + protected function setUp() : void { $this->originalAutoloaderCount = count(spl_autoload_functions()); $this->originalIncludePath = get_include_path(); } - public function tearDown() + public function tearDown() : void { if ( ! $this->originalIncludePath) { return; diff --git a/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php b/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php index b16ae4012dc..a5bc32faf50 100644 --- a/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php +++ b/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php @@ -56,7 +56,7 @@ class UnitOfWorkTest extends OrmTestCase */ private $eventManager; - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->_connectionMock = new ConnectionMock([], new DriverMock()); diff --git a/tests/Doctrine/Tests/ORM/Utility/IdentifierFlattenerTest.php b/tests/Doctrine/Tests/ORM/Utility/IdentifierFlattenerTest.php index 86b6503d376..a1ceccfdabd 100644 --- a/tests/Doctrine/Tests/ORM/Utility/IdentifierFlattenerTest.php +++ b/tests/Doctrine/Tests/ORM/Utility/IdentifierFlattenerTest.php @@ -25,7 +25,7 @@ class IdentifierFlattenerTest extends OrmFunctionalTestCase */ private $identifierFlattener; - protected function setUp() + protected function setUp() : void { parent::setUp(); diff --git a/tests/Doctrine/Tests/OrmFunctionalTestCase.php b/tests/Doctrine/Tests/OrmFunctionalTestCase.php index 6252b076499..66b6cfda305 100644 --- a/tests/Doctrine/Tests/OrmFunctionalTestCase.php +++ b/tests/Doctrine/Tests/OrmFunctionalTestCase.php @@ -19,6 +19,7 @@ use Doctrine\Tests\EventListener\CacheMetadataListener; use Doctrine\Tests\Models; use PHPUnit\Framework\AssertionFailedError; +use Throwable; /** * Base testcase class for all functional ORM testcases. @@ -330,7 +331,7 @@ protected function useModelSet($setName) * * @return void */ - protected function tearDown() + protected function tearDown() : void { $conn = static::$_sharedConn; @@ -639,7 +640,7 @@ protected function setUpEntitySchema(array $classNames) * * @return void */ - protected function setUp() + protected function setUp() : void { $this->setUpDBALTypes(); @@ -782,13 +783,9 @@ protected function _getEntityManager( } /** - * @param \Throwable $e - * - * @return void - * * @throws \Throwable */ - protected function onNotSuccessfulTest(\Throwable $e) + protected function onNotSuccessfulTest(Throwable $e) : void { if ($e instanceof AssertionFailedError) { throw $e; diff --git a/tests/Doctrine/Tests/VerifyDeprecations.php b/tests/Doctrine/Tests/VerifyDeprecations.php index bd713378325..9404af22d08 100644 --- a/tests/Doctrine/Tests/VerifyDeprecations.php +++ b/tests/Doctrine/Tests/VerifyDeprecations.php @@ -67,7 +67,7 @@ protected function ignoreDeprecationMessage(string $message) : void $this->ignoredDeprecations[] = $message; } - protected function expectDeprecationMessage(string $message) : void + protected function expectDeprecationMessageSame(string $message) : void { $this->expectedDeprecations[] = $message; }