[Cache] Accessing undefined constants raises an Error in php8
This commit is contained in:
parent
2799d559f3
commit
49fd0efb12
@ -66,8 +66,14 @@ class MemcachedAdapterTest extends AdapterTestCase
|
||||
*/
|
||||
public function testBadOptions($name, $value)
|
||||
{
|
||||
if (\PHP_VERSION_ID < 80000) {
|
||||
$this->expectException('ErrorException');
|
||||
$this->expectExceptionMessage('constant(): Couldn\'t find constant Memcached::');
|
||||
} else {
|
||||
$this->expectException('Error');
|
||||
$this->expectExceptionMessage('Undefined class constant \'Memcached::');
|
||||
}
|
||||
|
||||
MemcachedAdapter::createConnection([], [$name => $value]);
|
||||
}
|
||||
|
||||
|
@ -76,8 +76,14 @@ class MemcachedCacheTest extends CacheTestCase
|
||||
*/
|
||||
public function testBadOptions($name, $value)
|
||||
{
|
||||
if (\PHP_VERSION_ID < 80000) {
|
||||
$this->expectException('ErrorException');
|
||||
$this->expectExceptionMessage('constant(): Couldn\'t find constant Memcached::');
|
||||
} else {
|
||||
$this->expectException('Error');
|
||||
$this->expectExceptionMessage('Undefined class constant \'Memcached::');
|
||||
}
|
||||
|
||||
MemcachedCache::createConnection([], [$name => $value]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user