summaryrefslogtreecommitdiff
path: root/vendor/symfony/cache/Tests/Adapter/MaxIdLengthAdapterTest.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2019-02-03 13:44:03 +0000
committerGreg Roach <fisharebest@webtrees.net>2019-02-04 11:17:33 +0000
commit7def76c7d817a9ec81e9ae4a03a850514b1a2e1c (patch)
tree3fcf7e8236356daac44f7c17b8c0c5bc736a0926 /vendor/symfony/cache/Tests/Adapter/MaxIdLengthAdapterTest.php
parentadfb3656b8dac8505590490f4f8aaf4bea27881b (diff)
downloadwebtrees-7def76c7d817a9ec81e9ae4a03a850514b1a2e1c.tar.gz
webtrees-7def76c7d817a9ec81e9ae4a03a850514b1a2e1c.tar.bz2
webtrees-7def76c7d817a9ec81e9ae4a03a850514b1a2e1c.zip
Working on upgrade wizard and testing
Diffstat (limited to 'vendor/symfony/cache/Tests/Adapter/MaxIdLengthAdapterTest.php')
-rw-r--r--vendor/symfony/cache/Tests/Adapter/MaxIdLengthAdapterTest.php28
1 files changed, 14 insertions, 14 deletions
diff --git a/vendor/symfony/cache/Tests/Adapter/MaxIdLengthAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/MaxIdLengthAdapterTest.php
index 7613afa7f9..fec985e6da 100644
--- a/vendor/symfony/cache/Tests/Adapter/MaxIdLengthAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/MaxIdLengthAdapterTest.php
@@ -19,15 +19,15 @@ class MaxIdLengthAdapterTest extends TestCase
public function testLongKey()
{
$cache = $this->getMockBuilder(MaxIdLengthAdapter::class)
- ->setConstructorArgs(array(str_repeat('-', 10)))
- ->setMethods(array('doHave', 'doFetch', 'doDelete', 'doSave', 'doClear'))
+ ->setConstructorArgs([str_repeat('-', 10)])
+ ->setMethods(['doHave', 'doFetch', 'doDelete', 'doSave', 'doClear'])
->getMock();
$cache->expects($this->exactly(2))
->method('doHave')
->withConsecutive(
- array($this->equalTo('----------:nWfzGiCgLczv3SSUzXL3kg:')),
- array($this->equalTo('----------:---------------------------------------'))
+ [$this->equalTo('----------:nWfzGiCgLczv3SSUzXL3kg:')],
+ [$this->equalTo('----------:---------------------------------------')]
);
$cache->hasItem(str_repeat('-', 40));
@@ -37,7 +37,7 @@ class MaxIdLengthAdapterTest extends TestCase
public function testLongKeyVersioning()
{
$cache = $this->getMockBuilder(MaxIdLengthAdapter::class)
- ->setConstructorArgs(array(str_repeat('-', 26)))
+ ->setConstructorArgs([str_repeat('-', 26)])
->getMock();
$reflectionClass = new \ReflectionClass(AbstractAdapter::class);
@@ -46,20 +46,20 @@ class MaxIdLengthAdapterTest extends TestCase
$reflectionMethod->setAccessible(true);
// No versioning enabled
- $this->assertEquals('--------------------------:------------', $reflectionMethod->invokeArgs($cache, array(str_repeat('-', 12))));
- $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, array(str_repeat('-', 12)))));
- $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, array(str_repeat('-', 23)))));
- $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, array(str_repeat('-', 40)))));
+ $this->assertEquals('--------------------------:------------', $reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)]));
+ $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)])));
+ $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 23)])));
+ $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 40)])));
$reflectionProperty = $reflectionClass->getProperty('versioningIsEnabled');
$reflectionProperty->setAccessible(true);
$reflectionProperty->setValue($cache, true);
// Versioning enabled
- $this->assertEquals('--------------------------:1/------------', $reflectionMethod->invokeArgs($cache, array(str_repeat('-', 12))));
- $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, array(str_repeat('-', 12)))));
- $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, array(str_repeat('-', 23)))));
- $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, array(str_repeat('-', 40)))));
+ $this->assertEquals('--------------------------:1/------------', $reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)]));
+ $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)])));
+ $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 23)])));
+ $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 40)])));
}
/**
@@ -69,7 +69,7 @@ class MaxIdLengthAdapterTest extends TestCase
public function testTooLongNamespace()
{
$cache = $this->getMockBuilder(MaxIdLengthAdapter::class)
- ->setConstructorArgs(array(str_repeat('-', 40)))
+ ->setConstructorArgs([str_repeat('-', 40)])
->getMock();
}
}