use PHPUnit\Framework\TestCase;
use Symfony\Component\Cache\CacheItem;
use Symfony\Component\Cache\Exception\InvalidArgumentException;
use Symfony\Component\Cache\Exception\LogicException;
use Symfony\Component\Cache\Tests\Fixtures\StringableTag;
class CacheItemTest extends TestCase
{ public function testValidKey() { $this->
assertSame('foo', CacheItem::
validateKey('foo'
));
} /**
* @dataProvider provideInvalidKey
*/
public function testInvalidKey($key) { $this->
expectException(InvalidArgumentException::
class);
$this->
expectExceptionMessage('Cache key'
);
CacheItem::
validateKey($key);
}