summaryrefslogtreecommitdiff
path: root/vendor/symfony/cache/Tests
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2019-09-07 08:17:24 +0100
committerGreg Roach <fisharebest@webtrees.net>2019-09-07 08:17:24 +0100
commit43e2cc54543d9f79c9805f752e78e25c351646ff (patch)
treef8f252a8f0f6ff6061c177456865102c50a04810 /vendor/symfony/cache/Tests
parent4e96702fabf715ae955aafd54002fb5c57a109cf (diff)
downloadwebtrees-43e2cc54543d9f79c9805f752e78e25c351646ff.tar.gz
webtrees-43e2cc54543d9f79c9805f752e78e25c351646ff.tar.bz2
webtrees-43e2cc54543d9f79c9805f752e78e25c351646ff.zip
Update vendor dependencies
Diffstat (limited to 'vendor/symfony/cache/Tests')
-rw-r--r--vendor/symfony/cache/Tests/Adapter/AbstractRedisAdapterTest.php4
-rw-r--r--vendor/symfony/cache/Tests/Adapter/AdapterTestCase.php14
-rw-r--r--vendor/symfony/cache/Tests/Adapter/ChainAdapterTest.php19
-rw-r--r--vendor/symfony/cache/Tests/Adapter/FilesystemAdapterTest.php2
-rw-r--r--vendor/symfony/cache/Tests/Adapter/MaxIdLengthAdapterTest.php12
-rw-r--r--vendor/symfony/cache/Tests/Adapter/MemcachedAdapterTest.php12
-rw-r--r--vendor/symfony/cache/Tests/Adapter/PdoAdapterTest.php4
-rw-r--r--vendor/symfony/cache/Tests/Adapter/PdoDbalAdapterTest.php4
-rw-r--r--vendor/symfony/cache/Tests/Adapter/PhpArrayAdapterTest.php4
-rw-r--r--vendor/symfony/cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php4
-rw-r--r--vendor/symfony/cache/Tests/Adapter/PhpFilesAdapterTest.php2
-rw-r--r--vendor/symfony/cache/Tests/Adapter/PredisAdapterTest.php6
-rw-r--r--vendor/symfony/cache/Tests/Adapter/PredisClusterAdapterTest.php6
-rw-r--r--vendor/symfony/cache/Tests/Adapter/PredisRedisClusterAdapterTest.php4
-rw-r--r--vendor/symfony/cache/Tests/Adapter/PredisTagAwareAdapterTest.php2
-rw-r--r--vendor/symfony/cache/Tests/Adapter/PredisTagAwareClusterAdapterTest.php2
-rw-r--r--vendor/symfony/cache/Tests/Adapter/PredisTagAwareRedisClusterAdapterTest.php2
-rw-r--r--vendor/symfony/cache/Tests/Adapter/ProxyAdapterTest.php6
-rw-r--r--vendor/symfony/cache/Tests/Adapter/RedisAdapterTest.php12
-rw-r--r--vendor/symfony/cache/Tests/Adapter/RedisArrayAdapterTest.php2
-rw-r--r--vendor/symfony/cache/Tests/Adapter/RedisClusterAdapterTest.php6
-rw-r--r--vendor/symfony/cache/Tests/Adapter/RedisTagAwareAdapterTest.php2
-rw-r--r--vendor/symfony/cache/Tests/Adapter/RedisTagAwareArrayAdapterTest.php2
-rw-r--r--vendor/symfony/cache/Tests/Adapter/RedisTagAwareClusterAdapterTest.php2
-rw-r--r--vendor/symfony/cache/Tests/Adapter/TagAwareAdapterTest.php9
-rw-r--r--vendor/symfony/cache/Tests/CacheItemTest.php14
-rw-r--r--vendor/symfony/cache/Tests/DependencyInjection/CachePoolPassTest.php8
-rw-r--r--vendor/symfony/cache/Tests/DependencyInjection/CachePoolPrunerPassTest.php6
-rw-r--r--vendor/symfony/cache/Tests/Marshaller/DefaultMarshallerTest.php20
-rw-r--r--vendor/symfony/cache/Tests/Psr16CacheTest.php2
-rw-r--r--vendor/symfony/cache/Tests/Simple/AbstractRedisCacheTest.php4
-rw-r--r--vendor/symfony/cache/Tests/Simple/CacheTestCase.php2
-rw-r--r--vendor/symfony/cache/Tests/Simple/ChainCacheTest.php19
-rw-r--r--vendor/symfony/cache/Tests/Simple/MemcachedCacheTest.php12
-rw-r--r--vendor/symfony/cache/Tests/Simple/PdoCacheTest.php4
-rw-r--r--vendor/symfony/cache/Tests/Simple/PdoDbalCacheTest.php4
-rw-r--r--vendor/symfony/cache/Tests/Simple/PhpArrayCacheTest.php4
-rw-r--r--vendor/symfony/cache/Tests/Simple/PhpArrayCacheWithFallbackTest.php4
-rw-r--r--vendor/symfony/cache/Tests/Simple/RedisArrayCacheTest.php2
-rw-r--r--vendor/symfony/cache/Tests/Simple/RedisCacheTest.php10
-rw-r--r--vendor/symfony/cache/Tests/Simple/RedisClusterCacheTest.php2
-rw-r--r--vendor/symfony/cache/Tests/Traits/TagAwareTestTrait.php4
42 files changed, 127 insertions, 138 deletions
diff --git a/vendor/symfony/cache/Tests/Adapter/AbstractRedisAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/AbstractRedisAdapterTest.php
index 5fcec9a263..2d1024069d 100644
--- a/vendor/symfony/cache/Tests/Adapter/AbstractRedisAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/AbstractRedisAdapterTest.php
@@ -28,7 +28,7 @@ abstract class AbstractRedisAdapterTest extends AdapterTestCase
return new RedisAdapter(self::$redis, str_replace('\\', '.', __CLASS__), $defaultLifetime);
}
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
if (!\extension_loaded('redis')) {
self::markTestSkipped('Extension redis required.');
@@ -39,7 +39,7 @@ abstract class AbstractRedisAdapterTest extends AdapterTestCase
}
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
self::$redis = null;
}
diff --git a/vendor/symfony/cache/Tests/Adapter/AdapterTestCase.php b/vendor/symfony/cache/Tests/Adapter/AdapterTestCase.php
index 93318ffd48..de2562d637 100644
--- a/vendor/symfony/cache/Tests/Adapter/AdapterTestCase.php
+++ b/vendor/symfony/cache/Tests/Adapter/AdapterTestCase.php
@@ -21,7 +21,7 @@ use Symfony\Contracts\Cache\CallbackInterface;
abstract class AdapterTestCase extends CachePoolTest
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
@@ -120,7 +120,7 @@ abstract class AdapterTestCase extends CachePoolTest
CacheItem::METADATA_EXPIRY => 9.5 + time(),
CacheItem::METADATA_CTIME => 1000,
];
- $this->assertEquals($expected, $item->getMetadata(), 'Item metadata should embed expiry and ctime.', .6);
+ $this->assertEqualsWithDelta($expected, $item->getMetadata(), .6, 'Item metadata should embed expiry and ctime.');
}
public function testDefaultLifeTime()
@@ -252,6 +252,16 @@ abstract class AdapterTestCase extends CachePoolTest
$this->assertFalse($this->isPruned($cache, 'foo'));
$this->assertTrue($this->isPruned($cache, 'qux'));
}
+
+ /**
+ * @group issue-32995
+ *
+ * @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
+ */
+ public function testSavingObject()
+ {
+ parent::testSavingObject();
+ }
}
class NotUnserializable
diff --git a/vendor/symfony/cache/Tests/Adapter/ChainAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/ChainAdapterTest.php
index 46bbef4c31..ac92006404 100644
--- a/vendor/symfony/cache/Tests/Adapter/ChainAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/ChainAdapterTest.php
@@ -11,6 +11,7 @@
namespace Symfony\Component\Cache\Tests\Adapter;
+use PHPUnit\Framework\MockObject\MockObject;
use Symfony\Component\Cache\Adapter\AdapterInterface;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\Cache\Adapter\ChainAdapter;
@@ -33,21 +34,17 @@ class ChainAdapterTest extends AdapterTestCase
return new ChainAdapter([new ArrayAdapter($defaultLifetime), new ExternalAdapter(), new FilesystemAdapter('', $defaultLifetime)], $defaultLifetime);
}
- /**
- * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException
- * @expectedExceptionMessage At least one adapter must be specified.
- */
public function testEmptyAdaptersException()
{
+ $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('At least one adapter must be specified.');
new ChainAdapter([]);
}
- /**
- * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException
- * @expectedExceptionMessage The class "stdClass" does not implement
- */
public function testInvalidAdapterException()
{
+ $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('The class "stdClass" does not implement');
new ChainAdapter([new \stdClass()]);
}
@@ -73,7 +70,7 @@ class ChainAdapterTest extends AdapterTestCase
}
/**
- * @return \PHPUnit_Framework_MockObject_MockObject|PruneableCacheInterface
+ * @return MockObject|PruneableCacheInterface
*/
private function getPruneableMock()
{
@@ -90,7 +87,7 @@ class ChainAdapterTest extends AdapterTestCase
}
/**
- * @return \PHPUnit_Framework_MockObject_MockObject|PruneableCacheInterface
+ * @return MockObject|PruneableCacheInterface
*/
private function getFailingPruneableMock()
{
@@ -107,7 +104,7 @@ class ChainAdapterTest extends AdapterTestCase
}
/**
- * @return \PHPUnit_Framework_MockObject_MockObject|AdapterInterface
+ * @return MockObject|AdapterInterface
*/
private function getNonPruneableMock()
{
diff --git a/vendor/symfony/cache/Tests/Adapter/FilesystemAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/FilesystemAdapterTest.php
index fa8306826e..b7a69cb447 100644
--- a/vendor/symfony/cache/Tests/Adapter/FilesystemAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/FilesystemAdapterTest.php
@@ -24,7 +24,7 @@ class FilesystemAdapterTest extends AdapterTestCase
return new FilesystemAdapter('', $defaultLifetime);
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
self::rmdir(sys_get_temp_dir().'/symfony-cache');
}
diff --git a/vendor/symfony/cache/Tests/Adapter/MaxIdLengthAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/MaxIdLengthAdapterTest.php
index 5da80db0de..724aa9451c 100644
--- a/vendor/symfony/cache/Tests/Adapter/MaxIdLengthAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/MaxIdLengthAdapterTest.php
@@ -40,6 +40,10 @@ class MaxIdLengthAdapterTest extends TestCase
->setConstructorArgs([str_repeat('-', 26)])
->getMock();
+ $cache
+ ->method('doFetch')
+ ->willReturn(['2:']);
+
$reflectionClass = new \ReflectionClass(AbstractAdapter::class);
$reflectionMethod = $reflectionClass->getMethod('getId');
@@ -56,18 +60,16 @@ class MaxIdLengthAdapterTest extends TestCase
$reflectionProperty->setValue($cache, true);
// Versioning enabled
- $this->assertEquals('--------------------------:1:------------', $reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)]));
+ $this->assertEquals('--------------------------:2:------------', $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)])));
}
- /**
- * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException
- * @expectedExceptionMessage Namespace must be 26 chars max, 40 given ("----------------------------------------")
- */
public function testTooLongNamespace()
{
+ $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('Namespace must be 26 chars max, 40 given ("----------------------------------------")');
$cache = $this->getMockBuilder(MaxIdLengthAdapter::class)
->setConstructorArgs([str_repeat('-', 40)])
->getMock();
diff --git a/vendor/symfony/cache/Tests/Adapter/MemcachedAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/MemcachedAdapterTest.php
index 59f33f3aee..9f77072b4a 100644
--- a/vendor/symfony/cache/Tests/Adapter/MemcachedAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/MemcachedAdapterTest.php
@@ -23,7 +23,7 @@ class MemcachedAdapterTest extends AdapterTestCase
protected static $client;
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
if (!MemcachedAdapter::isSupported()) {
self::markTestSkipped('Extension memcached >=2.2.0 required.');
@@ -63,11 +63,11 @@ class MemcachedAdapterTest extends AdapterTestCase
/**
* @dataProvider provideBadOptions
- * @expectedException \ErrorException
- * @expectedExceptionMessage constant(): Couldn't find constant Memcached::
*/
public function testBadOptions($name, $value)
{
+ $this->expectException('ErrorException');
+ $this->expectExceptionMessage('constant(): Couldn\'t find constant Memcached::');
MemcachedAdapter::createConnection([], [$name => $value]);
}
@@ -93,12 +93,10 @@ class MemcachedAdapterTest extends AdapterTestCase
$this->assertSame(1, $client->getOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE));
}
- /**
- * @expectedException \Symfony\Component\Cache\Exception\CacheException
- * @expectedExceptionMessage MemcachedAdapter: "serializer" option must be "php" or "igbinary".
- */
public function testOptionSerializer()
{
+ $this->expectException('Symfony\Component\Cache\Exception\CacheException');
+ $this->expectExceptionMessage('MemcachedAdapter: "serializer" option must be "php" or "igbinary".');
if (!\Memcached::HAVE_JSON) {
$this->markTestSkipped('Memcached::HAVE_JSON required');
}
diff --git a/vendor/symfony/cache/Tests/Adapter/PdoAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/PdoAdapterTest.php
index b587cf6d62..cd4b95cf0e 100644
--- a/vendor/symfony/cache/Tests/Adapter/PdoAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/PdoAdapterTest.php
@@ -23,7 +23,7 @@ class PdoAdapterTest extends AdapterTestCase
protected static $dbFile;
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
if (!\extension_loaded('pdo_sqlite')) {
self::markTestSkipped('Extension pdo_sqlite required.');
@@ -35,7 +35,7 @@ class PdoAdapterTest extends AdapterTestCase
$pool->createTable();
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
@unlink(self::$dbFile);
}
diff --git a/vendor/symfony/cache/Tests/Adapter/PdoDbalAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/PdoDbalAdapterTest.php
index 1c9fd5140c..573a1b1d01 100644
--- a/vendor/symfony/cache/Tests/Adapter/PdoDbalAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/PdoDbalAdapterTest.php
@@ -24,7 +24,7 @@ class PdoDbalAdapterTest extends AdapterTestCase
protected static $dbFile;
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
if (!\extension_loaded('pdo_sqlite')) {
self::markTestSkipped('Extension pdo_sqlite required.');
@@ -35,7 +35,7 @@ class PdoDbalAdapterTest extends AdapterTestCase
$pool = new PdoAdapter(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]));
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
@unlink(self::$dbFile);
}
diff --git a/vendor/symfony/cache/Tests/Adapter/PhpArrayAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/PhpArrayAdapterTest.php
index 3a5904b107..c4055fb747 100644
--- a/vendor/symfony/cache/Tests/Adapter/PhpArrayAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/PhpArrayAdapterTest.php
@@ -58,12 +58,12 @@ class PhpArrayAdapterTest extends AdapterTestCase
protected static $file;
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php';
}
- protected function tearDown()
+ protected function tearDown(): void
{
if (file_exists(sys_get_temp_dir().'/symfony-cache')) {
FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache');
diff --git a/vendor/symfony/cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php b/vendor/symfony/cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php
index a7feced4ea..d8e2017988 100644
--- a/vendor/symfony/cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php
@@ -30,12 +30,12 @@ class PhpArrayAdapterWithFallbackTest extends AdapterTestCase
protected static $file;
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php';
}
- protected function tearDown()
+ protected function tearDown(): void
{
if (file_exists(sys_get_temp_dir().'/symfony-cache')) {
FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache');
diff --git a/vendor/symfony/cache/Tests/Adapter/PhpFilesAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/PhpFilesAdapterTest.php
index 2d5ddf20b7..dec63a62a0 100644
--- a/vendor/symfony/cache/Tests/Adapter/PhpFilesAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/PhpFilesAdapterTest.php
@@ -28,7 +28,7 @@ class PhpFilesAdapterTest extends AdapterTestCase
return new PhpFilesAdapter('sf-cache');
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache');
}
diff --git a/vendor/symfony/cache/Tests/Adapter/PredisAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/PredisAdapterTest.php
index abe0a21094..9ced661bfb 100644
--- a/vendor/symfony/cache/Tests/Adapter/PredisAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/PredisAdapterTest.php
@@ -16,9 +16,9 @@ use Symfony\Component\Cache\Adapter\RedisAdapter;
class PredisAdapterTest extends AbstractRedisAdapterTest
{
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
- parent::setupBeforeClass();
+ parent::setUpBeforeClass();
self::$redis = new \Predis\Client(['host' => getenv('REDIS_HOST')]);
}
@@ -34,7 +34,7 @@ class PredisAdapterTest extends AbstractRedisAdapterTest
$params = [
'scheme' => 'tcp',
- 'host' => 'localhost',
+ 'host' => $redisHost,
'port' => 6379,
'persistent' => 0,
'timeout' => 3,
diff --git a/vendor/symfony/cache/Tests/Adapter/PredisClusterAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/PredisClusterAdapterTest.php
index f723dc4468..63fb7ecba6 100644
--- a/vendor/symfony/cache/Tests/Adapter/PredisClusterAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/PredisClusterAdapterTest.php
@@ -13,13 +13,13 @@ namespace Symfony\Component\Cache\Tests\Adapter;
class PredisClusterAdapterTest extends AbstractRedisAdapterTest
{
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
- parent::setupBeforeClass();
+ parent::setUpBeforeClass();
self::$redis = new \Predis\Client([['host' => getenv('REDIS_HOST')]]);
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
self::$redis = null;
}
diff --git a/vendor/symfony/cache/Tests/Adapter/PredisRedisClusterAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/PredisRedisClusterAdapterTest.php
index c819c348d9..52a515d4df 100644
--- a/vendor/symfony/cache/Tests/Adapter/PredisRedisClusterAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/PredisRedisClusterAdapterTest.php
@@ -15,7 +15,7 @@ use Symfony\Component\Cache\Adapter\RedisAdapter;
class PredisRedisClusterAdapterTest extends AbstractRedisAdapterTest
{
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
if (!$hosts = getenv('REDIS_CLUSTER_HOSTS')) {
self::markTestSkipped('REDIS_CLUSTER_HOSTS env var is not defined.');
@@ -24,7 +24,7 @@ class PredisRedisClusterAdapterTest extends AbstractRedisAdapterTest
self::$redis = RedisAdapter::createConnection('redis:?host['.str_replace(' ', ']&host[', $hosts).']', ['class' => \Predis\Client::class, 'redis_cluster' => true]);
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
self::$redis = null;
}
diff --git a/vendor/symfony/cache/Tests/Adapter/PredisTagAwareAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/PredisTagAwareAdapterTest.php
index e321a1c9b8..e685d76083 100644
--- a/vendor/symfony/cache/Tests/Adapter/PredisTagAwareAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/PredisTagAwareAdapterTest.php
@@ -18,7 +18,7 @@ class PredisTagAwareAdapterTest extends PredisAdapterTest
{
use TagAwareTestTrait;
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
$this->skippedTests['testTagItemExpiry'] = 'Testing expiration slows down the test suite';
diff --git a/vendor/symfony/cache/Tests/Adapter/PredisTagAwareClusterAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/PredisTagAwareClusterAdapterTest.php
index a8a72e1de4..8c604c1ca6 100644
--- a/vendor/symfony/cache/Tests/Adapter/PredisTagAwareClusterAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/PredisTagAwareClusterAdapterTest.php
@@ -18,7 +18,7 @@ class PredisTagAwareClusterAdapterTest extends PredisClusterAdapterTest
{
use TagAwareTestTrait;
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
$this->skippedTests['testTagItemExpiry'] = 'Testing expiration slows down the test suite';
diff --git a/vendor/symfony/cache/Tests/Adapter/PredisTagAwareRedisClusterAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/PredisTagAwareRedisClusterAdapterTest.php
index 5b82a80ecb..e8d2ea654f 100644
--- a/vendor/symfony/cache/Tests/Adapter/PredisTagAwareRedisClusterAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/PredisTagAwareRedisClusterAdapterTest.php
@@ -18,7 +18,7 @@ class PredisTagAwareRedisClusterAdapterTest extends PredisRedisClusterAdapterTes
{
use TagAwareTestTrait;
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
$this->skippedTests['testTagItemExpiry'] = 'Testing expiration slows down the test suite';
diff --git a/vendor/symfony/cache/Tests/Adapter/ProxyAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/ProxyAdapterTest.php
index 4e9970cd92..24f92ca9a5 100644
--- a/vendor/symfony/cache/Tests/Adapter/ProxyAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/ProxyAdapterTest.php
@@ -37,12 +37,10 @@ class ProxyAdapterTest extends AdapterTestCase
return new ProxyAdapter(new ArrayAdapter(), '', $defaultLifetime);
}
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage OK bar
- */
public function testProxyfiedItem()
{
+ $this->expectException('Exception');
+ $this->expectExceptionMessage('OK bar');
$item = new CacheItem();
$pool = new ProxyAdapter(new TestingArrayAdapter($item));
diff --git a/vendor/symfony/cache/Tests/Adapter/RedisAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/RedisAdapterTest.php
index 4d9bc319eb..b039289cdc 100644
--- a/vendor/symfony/cache/Tests/Adapter/RedisAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/RedisAdapterTest.php
@@ -17,9 +17,9 @@ use Symfony\Component\Cache\Traits\RedisProxy;
class RedisAdapterTest extends AbstractRedisAdapterTest
{
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
- parent::setupBeforeClass();
+ parent::setUpBeforeClass();
self::$redis = AbstractAdapter::createConnection('redis://'.getenv('REDIS_HOST'), ['lazy' => true]);
}
@@ -63,11 +63,11 @@ class RedisAdapterTest extends AbstractRedisAdapterTest
/**
* @dataProvider provideFailedCreateConnection
- * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException
- * @expectedExceptionMessage Redis connection failed
*/
public function testFailedCreateConnection($dsn)
{
+ $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('Redis connection failed');
RedisAdapter::createConnection($dsn);
}
@@ -82,11 +82,11 @@ class RedisAdapterTest extends AbstractRedisAdapterTest
/**
* @dataProvider provideInvalidCreateConnection
- * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException
- * @expectedExceptionMessage Invalid Redis DSN
*/
public function testInvalidCreateConnection($dsn)
{
+ $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('Invalid Redis DSN');
RedisAdapter::createConnection($dsn);
}
diff --git a/vendor/symfony/cache/Tests/Adapter/RedisArrayAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/RedisArrayAdapterTest.php
index 749b039a03..63ade368f7 100644
--- a/vendor/symfony/cache/Tests/Adapter/RedisArrayAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/RedisArrayAdapterTest.php
@@ -13,7 +13,7 @@ namespace Symfony\Component\Cache\Tests\Adapter;
class RedisArrayAdapterTest extends AbstractRedisAdapterTest
{
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
parent::setupBeforeClass();
if (!class_exists('RedisArray')) {
diff --git a/vendor/symfony/cache/Tests/Adapter/RedisClusterAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/RedisClusterAdapterTest.php
index 75dd2790cc..34dfae19de 100644
--- a/vendor/symfony/cache/Tests/Adapter/RedisClusterAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/RedisClusterAdapterTest.php
@@ -17,7 +17,7 @@ use Symfony\Component\Cache\Traits\RedisClusterProxy;
class RedisClusterAdapterTest extends AbstractRedisAdapterTest
{
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
if (!class_exists('RedisCluster')) {
self::markTestSkipped('The RedisCluster class is required.');
@@ -39,11 +39,11 @@ class RedisClusterAdapterTest extends AbstractRedisAdapterTest
/**
* @dataProvider provideFailedCreateConnection
- * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException
- * @expectedExceptionMessage Redis connection failed
*/
public function testFailedCreateConnection($dsn)
{
+ $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('Redis connection failed');
RedisAdapter::createConnection($dsn);
}
diff --git a/vendor/symfony/cache/Tests/Adapter/RedisTagAwareAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/RedisTagAwareAdapterTest.php
index 95e5fe7e3a..ef14081857 100644
--- a/vendor/symfony/cache/Tests/Adapter/RedisTagAwareAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/RedisTagAwareAdapterTest.php
@@ -19,7 +19,7 @@ class RedisTagAwareAdapterTest extends RedisAdapterTest
{
use TagAwareTestTrait;
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
$this->skippedTests['testTagItemExpiry'] = 'Testing expiration slows down the test suite';
diff --git a/vendor/symfony/cache/Tests/Adapter/RedisTagAwareArrayAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/RedisTagAwareArrayAdapterTest.php
index 5855cc3adf..7c98020408 100644
--- a/vendor/symfony/cache/Tests/Adapter/RedisTagAwareArrayAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/RedisTagAwareArrayAdapterTest.php
@@ -18,7 +18,7 @@ class RedisTagAwareArrayAdapterTest extends RedisArrayAdapterTest
{
use TagAwareTestTrait;
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
$this->skippedTests['testTagItemExpiry'] = 'Testing expiration slows down the test suite';
diff --git a/vendor/symfony/cache/Tests/Adapter/RedisTagAwareClusterAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/RedisTagAwareClusterAdapterTest.php
index ef17c1d69e..7b7d680194 100644
--- a/vendor/symfony/cache/Tests/Adapter/RedisTagAwareClusterAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/RedisTagAwareClusterAdapterTest.php
@@ -19,7 +19,7 @@ class RedisTagAwareClusterAdapterTest extends RedisClusterAdapterTest
{
use TagAwareTestTrait;
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
$this->skippedTests['testTagItemExpiry'] = 'Testing expiration slows down the test suite';
diff --git a/vendor/symfony/cache/Tests/Adapter/TagAwareAdapterTest.php b/vendor/symfony/cache/Tests/Adapter/TagAwareAdapterTest.php
index 2a0266ef56..490e50339a 100644
--- a/vendor/symfony/cache/Tests/Adapter/TagAwareAdapterTest.php
+++ b/vendor/symfony/cache/Tests/Adapter/TagAwareAdapterTest.php
@@ -11,6 +11,7 @@
namespace Symfony\Component\Cache\Tests\Adapter;
+use PHPUnit\Framework\MockObject\MockObject;
use Symfony\Component\Cache\Adapter\AdapterInterface;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Adapter\TagAwareAdapter;
@@ -28,7 +29,7 @@ class TagAwareAdapterTest extends AdapterTestCase
return new TagAwareAdapter(new FilesystemAdapter('', $defaultLifetime));
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache');
}
@@ -65,7 +66,7 @@ class TagAwareAdapterTest extends AdapterTestCase
}
/**
- * @return \PHPUnit_Framework_MockObject_MockObject|PruneableCacheInterface
+ * @return MockObject|PruneableCacheInterface
*/
private function getPruneableMock()
{
@@ -82,7 +83,7 @@ class TagAwareAdapterTest extends AdapterTestCase
}
/**
- * @return \PHPUnit_Framework_MockObject_MockObject|PruneableCacheInterface
+ * @return MockObject|PruneableCacheInterface
*/
private function getFailingPruneableMock()
{
@@ -99,7 +100,7 @@ class TagAwareAdapterTest extends AdapterTestCase
}
/**
- * @return \PHPUnit_Framework_MockObject_MockObject|AdapterInterface
+ * @return MockObject|AdapterInterface
*/
private function getNonPruneableMock()
{
diff --git a/vendor/symfony/cache/Tests/CacheItemTest.php b/vendor/symfony/cache/Tests/CacheItemTest.php
index 0e3f4b9a73..b36b6343a8 100644
--- a/vendor/symfony/cache/Tests/CacheItemTest.php
+++ b/vendor/symfony/cache/Tests/CacheItemTest.php
@@ -23,11 +23,11 @@ class CacheItemTest extends TestCase
/**
* @dataProvider provideInvalidKey
- * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException
- * @expectedExceptionMessage Cache key
*/
public function testInvalidKey($key)
{
+ $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('Cache key');
CacheItem::validateKey($key);
}
@@ -69,11 +69,11 @@ class CacheItemTest extends TestCase
/**
* @dataProvider provideInvalidKey
- * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException
- * @expectedExceptionMessage Cache tag
*/
public function testInvalidTag($tag)
{
+ $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('Cache tag');
$item = new CacheItem();
$r = new \ReflectionProperty($item, 'isTaggable');
$r->setAccessible(true);
@@ -82,12 +82,10 @@ class CacheItemTest extends TestCase
$item->tag($tag);
}
- /**
- * @expectedException \Symfony\Component\Cache\Exception\LogicException
- * @expectedExceptionMessage Cache item "foo" comes from a non tag-aware pool: you cannot tag it.
- */
public function testNonTaggableItem()
{
+ $this->expectException('Symfony\Component\Cache\Exception\LogicException');
+ $this->expectExceptionMessage('Cache item "foo" comes from a non tag-aware pool: you cannot tag it.');
$item = new CacheItem();
$r = new \ReflectionProperty($item, 'key');
$r->setAccessible(true);
diff --git a/vendor/symfony/cache/Tests/DependencyInjection/CachePoolPassTest.php b/vendor/symfony/cache/Tests/DependencyInjection/CachePoolPassTest.php
index 4681b3dc81..85b7e64b1c 100644
--- a/vendor/symfony/cache/Tests/DependencyInjection/CachePoolPassTest.php
+++ b/vendor/symfony/cache/Tests/DependencyInjection/CachePoolPassTest.php
@@ -24,7 +24,7 @@ class CachePoolPassTest extends TestCase
{
private $cachePoolPass;
- protected function setUp()
+ protected function setUp(): void
{
$this->cachePoolPass = new CachePoolPass();
}
@@ -130,12 +130,10 @@ class CachePoolPassTest extends TestCase
$this->assertSame('+naTpPa4Sm', $cachePool->getArgument(1));
}
- /**
- * @expectedException \InvalidArgumentException
- * @expectedExceptionMessage Invalid "cache.pool" tag for service "app.cache_pool": accepted attributes are
- */
public function testThrowsExceptionWhenCachePoolTagHasUnknownAttributes()
{
+ $this->expectException('InvalidArgumentException');
+ $this->expectExceptionMessage('Invalid "cache.pool" tag for service "app.cache_pool": accepted attributes are');
$container = new ContainerBuilder();
$container->setParameter('kernel.container_class', 'app');
$container->setParameter('kernel.project_dir', 'foo');
diff --git a/vendor/symfony/cache/Tests/DependencyInjection/CachePoolPrunerPassTest.php b/vendor/symfony/cache/Tests/DependencyInjection/CachePoolPrunerPassTest.php
index 128ee243c6..2a1ab49b64 100644
--- a/vendor/symfony/cache/Tests/DependencyInjection/CachePoolPrunerPassTest.php
+++ b/vendor/symfony/cache/Tests/DependencyInjection/CachePoolPrunerPassTest.php
@@ -56,12 +56,10 @@ class CachePoolPrunerPassTest extends TestCase
$this->assertCount($aliasesBefore, $container->getAliases());
}
- /**
- * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
- * @expectedExceptionMessage Class "Symfony\Component\Cache\Tests\DependencyInjection\NotFound" used for service "pool.not-found" cannot be found.
- */
public function testCompilerPassThrowsOnInvalidDefinitionClass()
{
+ $this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('Class "Symfony\Component\Cache\Tests\DependencyInjection\NotFound" used for service "pool.not-found" cannot be found.');
$container = new ContainerBuilder();
$container->register('console.command.cache_pool_prune')->addArgument([]);
$container->register('pool.not-found', NotFound::class)->addTag('cache.pool');
diff --git a/vendor/symfony/cache/Tests/Marshaller/DefaultMarshallerTest.php b/vendor/symfony/cache/Tests/Marshaller/DefaultMarshallerTest.php
index daa1fd19f4..aa0e0221d4 100644
--- a/vendor/symfony/cache/Tests/Marshaller/DefaultMarshallerTest.php
+++ b/vendor/symfony/cache/Tests/Marshaller/DefaultMarshallerTest.php
@@ -50,33 +50,29 @@ class DefaultMarshallerTest extends TestCase
$this->assertSame(0, $marshaller->unmarshall(igbinary_serialize(0)));
}
- /**
- * @expectedException \DomainException
- * @expectedExceptionMessage Class not found: NotExistingClass
- */
public function testNativeUnserializeNotFoundClass()
{
+ $this->expectException('DomainException');
+ $this->expectExceptionMessage('Class not found: NotExistingClass');
$marshaller = new DefaultMarshaller();
$marshaller->unmarshall('O:16:"NotExistingClass":0:{}');
}
/**
* @requires extension igbinary
- * @expectedException \DomainException
- * @expectedExceptionMessage Class not found: NotExistingClass
*/
public function testIgbinaryUnserializeNotFoundClass()
{
+ $this->expectException('DomainException');
+ $this->expectExceptionMessage('Class not found: NotExistingClass');
$marshaller = new DefaultMarshaller();
$marshaller->unmarshall(rawurldecode('%00%00%00%02%17%10NotExistingClass%14%00'));
}
- /**
- * @expectedException \DomainException
- * @expectedExceptionMessage unserialize(): Error at offset 0 of 3 bytes
- */
public function testNativeUnserializeInvalid()
{
+ $this->expectException('DomainException');
+ $this->expectExceptionMessage('unserialize(): Error at offset 0 of 3 bytes');
$marshaller = new DefaultMarshaller();
set_error_handler(function () { return false; });
try {
@@ -88,11 +84,11 @@ class DefaultMarshallerTest extends TestCase
/**
* @requires extension igbinary
- * @expectedException \DomainException
- * @expectedExceptionMessage igbinary_unserialize_zval: unknown type '61', position 5
*/
public function testIgbinaryUnserializeInvalid()
{
+ $this->expectException('DomainException');
+ $this->expectExceptionMessage('igbinary_unserialize_zval: unknown type \'61\', position 5');
$marshaller = new DefaultMarshaller();
set_error_handler(function () { return false; });
try {
diff --git a/vendor/symfony/cache/Tests/Psr16CacheTest.php b/vendor/symfony/cache/Tests/Psr16CacheTest.php
index e56d99e441..7774e1ddd5 100644
--- a/vendor/symfony/cache/Tests/Psr16CacheTest.php
+++ b/vendor/symfony/cache/Tests/Psr16CacheTest.php
@@ -21,7 +21,7 @@ use Symfony\Component\Cache\Psr16Cache;
*/
class Psr16CacheTest extends SimpleCacheTest
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/vendor/symfony/cache/Tests/Simple/AbstractRedisCacheTest.php b/vendor/symfony/cache/Tests/Simple/AbstractRedisCacheTest.php
index a9f5d98b92..81718970c4 100644
--- a/vendor/symfony/cache/Tests/Simple/AbstractRedisCacheTest.php
+++ b/vendor/symfony/cache/Tests/Simple/AbstractRedisCacheTest.php
@@ -31,7 +31,7 @@ abstract class AbstractRedisCacheTest extends CacheTestCase
return new RedisCache(self::$redis, str_replace('\\', '.', __CLASS__), $defaultLifetime);
}
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
if (!\extension_loaded('redis')) {
self::markTestSkipped('Extension redis required.');
@@ -42,7 +42,7 @@ abstract class AbstractRedisCacheTest extends CacheTestCase
}
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
self::$redis = null;
}
diff --git a/vendor/symfony/cache/Tests/Simple/CacheTestCase.php b/vendor/symfony/cache/Tests/Simple/CacheTestCase.php
index d4b3d07f62..d23a0ff84e 100644
--- a/vendor/symfony/cache/Tests/Simple/CacheTestCase.php
+++ b/vendor/symfony/cache/Tests/Simple/CacheTestCase.php
@@ -17,7 +17,7 @@ use Symfony\Component\Cache\PruneableInterface;
abstract class CacheTestCase extends SimpleCacheTest
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/vendor/symfony/cache/Tests/Simple/ChainCacheTest.php b/vendor/symfony/cache/Tests/Simple/ChainCacheTest.php
index 0af56cd30d..3ec828c150 100644
--- a/vendor/symfony/cache/Tests/Simple/ChainCacheTest.php
+++ b/vendor/symfony/cache/Tests/Simple/ChainCacheTest.php
@@ -11,6 +11,7 @@
namespace Symfony\Component\Cache\Tests\Simple;
+use PHPUnit\Framework\MockObject\MockObject;
use Psr\SimpleCache\CacheInterface;
use Symfony\Component\Cache\PruneableInterface;
use Symfony\Component\Cache\Simple\ArrayCache;
@@ -28,21 +29,17 @@ class ChainCacheTest extends CacheTestCase
return new ChainCache([new ArrayCache($defaultLifetime), new FilesystemCache('', $defaultLifetime)], $defaultLifetime);
}
- /**
- * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException
- * @expectedExceptionMessage At least one cache must be specified.
- */
public function testEmptyCachesException()
{
+ $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('At least one cache must be specified.');
new ChainCache([]);
}
- /**
- * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException
- * @expectedExceptionMessage The class "stdClass" does not implement
- */
public function testInvalidCacheException()
{
+ $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('The class "stdClass" does not implement');
new ChainCache([new \stdClass()]);
}
@@ -68,7 +65,7 @@ class ChainCacheTest extends CacheTestCase
}
/**
- * @return \PHPUnit_Framework_MockObject_MockObject|PruneableCacheInterface
+ * @return MockObject|PruneableCacheInterface
*/
private function getPruneableMock()
{
@@ -85,7 +82,7 @@ class ChainCacheTest extends CacheTestCase
}
/**
- * @return \PHPUnit_Framework_MockObject_MockObject|PruneableCacheInterface
+ * @return MockObject|PruneableCacheInterface
*/
private function getFailingPruneableMock()
{
@@ -102,7 +99,7 @@ class ChainCacheTest extends CacheTestCase
}
/**
- * @return \PHPUnit_Framework_MockObject_MockObject|CacheInterface
+ * @return MockObject|CacheInterface
*/
private function getNonPruneableMock()
{
diff --git a/vendor/symfony/cache/Tests/Simple/MemcachedCacheTest.php b/vendor/symfony/cache/Tests/Simple/MemcachedCacheTest.php
index 692259296f..3a7b27b6c0 100644
--- a/vendor/symfony/cache/Tests/Simple/MemcachedCacheTest.php
+++ b/vendor/symfony/cache/Tests/Simple/MemcachedCacheTest.php
@@ -27,7 +27,7 @@ class MemcachedCacheTest extends CacheTestCase
protected static $client;
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
if (!MemcachedCache::isSupported()) {
self::markTestSkipped('Extension memcached >=2.2.0 required.');
@@ -76,11 +76,11 @@ class MemcachedCacheTest extends CacheTestCase
/**
* @dataProvider provideBadOptions
- * @expectedException \ErrorException
- * @expectedExceptionMessage constant(): Couldn't find constant Memcached::
*/
public function testBadOptions($name, $value)
{
+ $this->expectException('ErrorException');
+ $this->expectExceptionMessage('constant(): Couldn\'t find constant Memcached::');
MemcachedCache::createConnection([], [$name => $value]);
}
@@ -105,12 +105,10 @@ class MemcachedCacheTest extends CacheTestCase
$this->assertSame(1, $client->getOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE));
}
- /**
- * @expectedException \Symfony\Component\Cache\Exception\CacheException
- * @expectedExceptionMessage MemcachedAdapter: "serializer" option must be "php" or "igbinary".
- */
public function testOptionSerializer()
{
+ $this->expectException('Symfony\Component\Cache\Exception\CacheException');
+ $this->expectExceptionMessage('MemcachedAdapter: "serializer" option must be "php" or "igbinary".');
if (!\Memcached::HAVE_JSON) {
$this->markTestSkipped('Memcached::HAVE_JSON required');
}
diff --git a/vendor/symfony/cache/Tests/Simple/PdoCacheTest.php b/vendor/symfony/cache/Tests/Simple/PdoCacheTest.php
index fbdf03be7e..c326d387d5 100644
--- a/vendor/symfony/cache/Tests/Simple/PdoCacheTest.php
+++ b/vendor/symfony/cache/Tests/Simple/PdoCacheTest.php
@@ -24,7 +24,7 @@ class PdoCacheTest extends CacheTestCase
protected static $dbFile;
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
if (!\extension_loaded('pdo_sqlite')) {
self::markTestSkipped('Extension pdo_sqlite required.');
@@ -36,7 +36,7 @@ class PdoCacheTest extends CacheTestCase
$pool->createTable();
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
@unlink(self::$dbFile);
}
diff --git a/vendor/symfony/cache/Tests/Simple/PdoDbalCacheTest.php b/vendor/symfony/cache/Tests/Simple/PdoDbalCacheTest.php
index af5c42340b..2893fee996 100644
--- a/vendor/symfony/cache/Tests/Simple/PdoDbalCacheTest.php
+++ b/vendor/symfony/cache/Tests/Simple/PdoDbalCacheTest.php
@@ -25,7 +25,7 @@ class PdoDbalCacheTest extends CacheTestCase
protected static $dbFile;
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
if (!\extension_loaded('pdo_sqlite')) {
self::markTestSkipped('Extension pdo_sqlite required.');
@@ -37,7 +37,7 @@ class PdoDbalCacheTest extends CacheTestCase
$pool->createTable();
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
@unlink(self::$dbFile);
}
diff --git a/vendor/symfony/cache/Tests/Simple/PhpArrayCacheTest.php b/vendor/symfony/cache/Tests/Simple/PhpArrayCacheTest.php
index 5272604dc3..c1d4ab2d77 100644
--- a/vendor/symfony/cache/Tests/Simple/PhpArrayCacheTest.php
+++ b/vendor/symfony/cache/Tests/Simple/PhpArrayCacheTest.php
@@ -50,12 +50,12 @@ class PhpArrayCacheTest extends CacheTestCase
protected static $file;
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php';
}
- protected function tearDown()
+ protected function tearDown(): void
{
if (file_exists(sys_get_temp_dir().'/symfony-cache')) {
FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache');
diff --git a/vendor/symfony/cache/Tests/Simple/PhpArrayCacheWithFallbackTest.php b/vendor/symfony/cache/Tests/Simple/PhpArrayCacheWithFallbackTest.php
index 90aa7bb6ef..7ae814a98a 100644
--- a/vendor/symfony/cache/Tests/Simple/PhpArrayCacheWithFallbackTest.php
+++ b/vendor/symfony/cache/Tests/Simple/PhpArrayCacheWithFallbackTest.php
@@ -37,12 +37,12 @@ class PhpArrayCacheWithFallbackTest extends CacheTestCase
protected static $file;
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php';
}
- protected function tearDown()
+ protected function tearDown(): void
{
if (file_exists(sys_get_temp_dir().'/symfony-cache')) {
FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache');
diff --git a/vendor/symfony/cache/Tests/Simple/RedisArrayCacheTest.php b/vendor/symfony/cache/Tests/Simple/RedisArrayCacheTest.php
index b52f5f9acd..834b6206ac 100644
--- a/vendor/symfony/cache/Tests/Simple/RedisArrayCacheTest.php
+++ b/vendor/symfony/cache/Tests/Simple/RedisArrayCacheTest.php
@@ -16,7 +16,7 @@ namespace Symfony\Component\Cache\Tests\Simple;
*/
class RedisArrayCacheTest extends AbstractRedisCacheTest
{
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
parent::setupBeforeClass();
if (!class_exists('RedisArray')) {
diff --git a/vendor/symfony/cache/Tests/Simple/RedisCacheTest.php b/vendor/symfony/cache/Tests/Simple/RedisCacheTest.php
index ddb674b285..b5792f3971 100644
--- a/vendor/symfony/cache/Tests/Simple/RedisCacheTest.php
+++ b/vendor/symfony/cache/Tests/Simple/RedisCacheTest.php
@@ -18,7 +18,7 @@ use Symfony\Component\Cache\Simple\RedisCache;
*/
class RedisCacheTest extends AbstractRedisCacheTest
{
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
parent::setupBeforeClass();
self::$redis = RedisCache::createConnection('redis://'.getenv('REDIS_HOST'));
@@ -48,11 +48,11 @@ class RedisCacheTest extends AbstractRedisCacheTest
/**
* @dataProvider provideFailedCreateConnection
- * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException
- * @expectedExceptionMessage Redis connection failed
*/
public function testFailedCreateConnection($dsn)
{
+ $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('Redis connection failed');
RedisCache::createConnection($dsn);
}
@@ -67,11 +67,11 @@ class RedisCacheTest extends AbstractRedisCacheTest
/**
* @dataProvider provideInvalidCreateConnection
- * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException
- * @expectedExceptionMessage Invalid Redis DSN
*/
public function testInvalidCreateConnection($dsn)
{
+ $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('Invalid Redis DSN');
RedisCache::createConnection($dsn);
}
diff --git a/vendor/symfony/cache/Tests/Simple/RedisClusterCacheTest.php b/vendor/symfony/cache/Tests/Simple/RedisClusterCacheTest.php
index 33c7acae0b..c5115c7c70 100644
--- a/vendor/symfony/cache/Tests/Simple/RedisClusterCacheTest.php
+++ b/vendor/symfony/cache/Tests/Simple/RedisClusterCacheTest.php
@@ -16,7 +16,7 @@ namespace Symfony\Component\Cache\Tests\Simple;
*/
class RedisClusterCacheTest extends AbstractRedisCacheTest
{
- public static function setupBeforeClass()
+ public static function setUpBeforeClass(): void
{
if (!class_exists('RedisCluster')) {
self::markTestSkipped('The RedisCluster class is required.');
diff --git a/vendor/symfony/cache/Tests/Traits/TagAwareTestTrait.php b/vendor/symfony/cache/Tests/Traits/TagAwareTestTrait.php
index 38cc4dc9cc..9c6ce3956b 100644
--- a/vendor/symfony/cache/Tests/Traits/TagAwareTestTrait.php
+++ b/vendor/symfony/cache/Tests/Traits/TagAwareTestTrait.php
@@ -20,11 +20,9 @@ use Symfony\Component\Cache\CacheItem;
*/
trait TagAwareTestTrait
{
- /**
- * @expectedException \Psr\Cache\InvalidArgumentException
- */
public function testInvalidTag()
{
+ $this->expectException('Psr\Cache\InvalidArgumentException');
$pool = $this->createCachePool();
$item = $pool->getItem('foo');
$item->tag(':');