} public function testTag() { $item =
new CacheItem();
$r =
new \
ReflectionProperty($item, 'isTaggable'
);
$r->
setValue($item, true
);
$this->
assertSame($item,
$item->
tag('foo'
));
$this->
assertSame($item,
$item->
tag(['bar', 'baz'
]));
$this->
assertSame($item,
$item->
tag(new StringableTag('qux'
)));
$this->
assertSame($item,
$item->
tag([new StringableTag('quux'
),
new StringableTag('quuux'
)]));
(\Closure::
bind(function D
) use ($item) { $this->
assertSame(['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz', 'qux' => 'qux', 'quux' => 'quux', 'quuux' => 'quuux'
],
$item->newMetadata
[CacheItem::METADATA_TAGS
]);
},
$this, CacheItem::
class))();
} /**
* @dataProvider provideInvalidKey
*/
public function testInvalidTag($tag) {