From eaedc37d7b955daa60eee772e5a1815637931c08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Wed, 11 Jan 2017 11:04:43 +0100 Subject: [PATCH] Fix alignment issues on DefaultCacheFactoryTest.php --- .../ORM/Cache/DefaultCacheFactoryTest.php | 102 +++++++++--------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Cache/DefaultCacheFactoryTest.php b/tests/Doctrine/Tests/ORM/Cache/DefaultCacheFactoryTest.php index 90922caeddf..1ca213b20e0 100644 --- a/tests/Doctrine/Tests/ORM/Cache/DefaultCacheFactoryTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/DefaultCacheFactoryTest.php @@ -52,13 +52,13 @@ protected function setUp() $this->enableSecondLevelCache(); parent::setUp(); - $this->em = $this->_getTestEntityManager(); - $this->regionsConfig = new RegionsConfiguration; - $arguments = [$this->regionsConfig, $this->getSharedSecondLevelCacheDriverImpl()]; - $this->factory = $this->getMockBuilder(DefaultCacheFactory::class) - ->setMethods(['getRegion']) - ->setConstructorArgs($arguments) - ->getMock(); + $this->em = $this->_getTestEntityManager(); + $this->regionsConfig = new RegionsConfiguration; + $arguments = [$this->regionsConfig, $this->getSharedSecondLevelCacheDriverImpl()]; + $this->factory = $this->getMockBuilder(DefaultCacheFactory::class) + ->setMethods(['getRegion']) + ->setConstructorArgs($arguments) + ->getMock(); } public function testImplementsCacheFactory() @@ -68,10 +68,10 @@ public function testImplementsCacheFactory() public function testBuildCachedEntityPersisterReadOnly() { - $em = $this->em; - $metadata = clone $em->getClassMetadata(State::class); - $persister = new BasicEntityPersister($em, $metadata); - $region = new ConcurrentRegionMock(new DefaultRegion('regionName', $this->getSharedSecondLevelCacheDriverImpl())); + $em = $this->em; + $metadata = clone $em->getClassMetadata(State::class); + $persister = new BasicEntityPersister($em, $metadata); + $region = new ConcurrentRegionMock(new DefaultRegion('regionName', $this->getSharedSecondLevelCacheDriverImpl())); $metadata->cache['usage'] = ClassMetadata::CACHE_USAGE_READ_ONLY; @@ -88,10 +88,10 @@ public function testBuildCachedEntityPersisterReadOnly() public function testBuildCachedEntityPersisterReadWrite() { - $em = $this->em; - $metadata = clone $em->getClassMetadata(State::class); - $persister = new BasicEntityPersister($em, $metadata); - $region = new ConcurrentRegionMock(new DefaultRegion('regionName', $this->getSharedSecondLevelCacheDriverImpl())); + $em = $this->em; + $metadata = clone $em->getClassMetadata(State::class); + $persister = new BasicEntityPersister($em, $metadata); + $region = new ConcurrentRegionMock(new DefaultRegion('regionName', $this->getSharedSecondLevelCacheDriverImpl())); $metadata->cache['usage'] = ClassMetadata::CACHE_USAGE_READ_WRITE; @@ -108,10 +108,10 @@ public function testBuildCachedEntityPersisterReadWrite() public function testBuildCachedEntityPersisterNonStrictReadWrite() { - $em = $this->em; - $metadata = clone $em->getClassMetadata(State::class); - $persister = new BasicEntityPersister($em, $metadata); - $region = new ConcurrentRegionMock(new DefaultRegion('regionName', $this->getSharedSecondLevelCacheDriverImpl())); + $em = $this->em; + $metadata = clone $em->getClassMetadata(State::class); + $persister = new BasicEntityPersister($em, $metadata); + $region = new ConcurrentRegionMock(new DefaultRegion('regionName', $this->getSharedSecondLevelCacheDriverImpl())); $metadata->cache['usage'] = ClassMetadata::CACHE_USAGE_NONSTRICT_READ_WRITE; @@ -128,11 +128,11 @@ public function testBuildCachedEntityPersisterNonStrictReadWrite() public function testBuildCachedCollectionPersisterReadOnly() { - $em = $this->em; - $metadata = $em->getClassMetadata(State::class); - $mapping = $metadata->associationMappings['cities']; - $persister = new OneToManyPersister($em); - $region = new ConcurrentRegionMock(new DefaultRegion('regionName', $this->getSharedSecondLevelCacheDriverImpl())); + $em = $this->em; + $metadata = $em->getClassMetadata(State::class); + $mapping = $metadata->associationMappings['cities']; + $persister = new OneToManyPersister($em); + $region = new ConcurrentRegionMock(new DefaultRegion('regionName', $this->getSharedSecondLevelCacheDriverImpl())); $mapping['cache']['usage'] = ClassMetadata::CACHE_USAGE_READ_ONLY; @@ -150,11 +150,11 @@ public function testBuildCachedCollectionPersisterReadOnly() public function testBuildCachedCollectionPersisterReadWrite() { - $em = $this->em; - $metadata = $em->getClassMetadata(State::class); - $mapping = $metadata->associationMappings['cities']; - $persister = new OneToManyPersister($em); - $region = new ConcurrentRegionMock(new DefaultRegion('regionName', $this->getSharedSecondLevelCacheDriverImpl())); + $em = $this->em; + $metadata = $em->getClassMetadata(State::class); + $mapping = $metadata->associationMappings['cities']; + $persister = new OneToManyPersister($em); + $region = new ConcurrentRegionMock(new DefaultRegion('regionName', $this->getSharedSecondLevelCacheDriverImpl())); $mapping['cache']['usage'] = ClassMetadata::CACHE_USAGE_READ_WRITE; @@ -171,11 +171,11 @@ public function testBuildCachedCollectionPersisterReadWrite() public function testBuildCachedCollectionPersisterNonStrictReadWrite() { - $em = $this->em; - $metadata = $em->getClassMetadata(State::class); - $mapping = $metadata->associationMappings['cities']; - $persister = new OneToManyPersister($em); - $region = new ConcurrentRegionMock(new DefaultRegion('regionName', $this->getSharedSecondLevelCacheDriverImpl())); + $em = $this->em; + $metadata = $em->getClassMetadata(State::class); + $mapping = $metadata->associationMappings['cities']; + $persister = new OneToManyPersister($em); + $region = new ConcurrentRegionMock(new DefaultRegion('regionName', $this->getSharedSecondLevelCacheDriverImpl())); $mapping['cache']['usage'] = ClassMetadata::CACHE_USAGE_NONSTRICT_READ_WRITE; @@ -234,9 +234,9 @@ public function testCreateNewCacheDriver() */ public function testBuildCachedEntityPersisterNonStrictException() { - $em = $this->em; - $metadata = clone $em->getClassMetadata(State::class); - $persister = new BasicEntityPersister($em, $metadata); + $em = $this->em; + $metadata = clone $em->getClassMetadata(State::class); + $persister = new BasicEntityPersister($em, $metadata); $metadata->cache['usage'] = -1; @@ -249,10 +249,10 @@ public function testBuildCachedEntityPersisterNonStrictException() */ public function testBuildCachedCollectionPersisterException() { - $em = $this->em; - $metadata = $em->getClassMetadata(State::class); - $mapping = $metadata->associationMappings['cities']; - $persister = new OneToManyPersister($em); + $em = $this->em; + $metadata = $em->getClassMetadata(State::class); + $mapping = $metadata->associationMappings['cities']; + $persister = new OneToManyPersister($em); $mapping['cache']['usage'] = -1; @@ -269,8 +269,8 @@ public function testInvalidFileLockRegionDirectoryException() $factory->getRegion( [ - 'usage' => ClassMetadata::CACHE_USAGE_READ_WRITE, - 'region' => 'foo' + 'usage' => ClassMetadata::CACHE_USAGE_READ_WRITE, + 'region' => 'foo' ] ); } @@ -281,14 +281,14 @@ public function testBuildsNewNamespacedCacheInstancePerRegionInstance() $fooRegion = $factory->getRegion( [ - 'region' => 'foo', - 'usage' => ClassMetadata::CACHE_USAGE_READ_ONLY, + 'region' => 'foo', + 'usage' => ClassMetadata::CACHE_USAGE_READ_ONLY, ] ); $barRegion = $factory->getRegion( [ - 'region' => 'bar', - 'usage' => ClassMetadata::CACHE_USAGE_READ_ONLY, + 'region' => 'bar', + 'usage' => ClassMetadata::CACHE_USAGE_READ_ONLY, ] ); @@ -331,8 +331,8 @@ public function testBuildsDefaultCacheRegionFromGenericCacheRegion() DefaultRegion::class, $factory->getRegion( [ - 'region' => 'bar', - 'usage' => ClassMetadata::CACHE_USAGE_READ_ONLY, + 'region' => 'bar', + 'usage' => ClassMetadata::CACHE_USAGE_READ_ONLY, ] ) ); @@ -349,8 +349,8 @@ public function testBuildsMultiGetCacheRegionFromGenericCacheRegion() DefaultMultiGetRegion::class, $factory->getRegion( [ - 'region' => 'bar', - 'usage' => ClassMetadata::CACHE_USAGE_READ_ONLY, + 'region' => 'bar', + 'usage' => ClassMetadata::CACHE_USAGE_READ_ONLY, ] ) );