Skip to content

Commit

Permalink
Fix alignment issues on DefaultCacheFactoryTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
lcobucci committed Jan 11, 2017
1 parent 5a562b3 commit eaedc37
Showing 1 changed file with 51 additions and 51 deletions.
102 changes: 51 additions & 51 deletions tests/Doctrine/Tests/ORM/Cache/DefaultCacheFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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;

Expand All @@ -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;

Expand All @@ -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;

Expand All @@ -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;

Expand All @@ -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;

Expand All @@ -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;

Expand Down Expand Up @@ -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;

Expand All @@ -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;

Expand All @@ -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'
]
);
}
Expand All @@ -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,
]
);

Expand Down Expand Up @@ -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,
]
)
);
Expand All @@ -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,
]
)
);
Expand Down

0 comments on commit eaedc37

Please sign in to comment.