Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / validator / Tests / Mapping / Cache / Psr6CacheTest.php
diff --git a/vendor/symfony/validator/Tests/Mapping/Cache/Psr6CacheTest.php b/vendor/symfony/validator/Tests/Mapping/Cache/Psr6CacheTest.php
new file mode 100644 (file)
index 0000000..c11dddb
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+
+namespace Symfony\Component\Validator\Tests\Mapping\Cache;
+
+use Symfony\Component\Cache\Adapter\ArrayAdapter;
+use Symfony\Component\Validator\Mapping\Cache\Psr6Cache;
+use Symfony\Component\Validator\Mapping\ClassMetadata;
+
+/**
+ * @author Kévin Dunglas <dunglas@gmail.com>
+ */
+class Psr6CacheTest extends AbstractCacheTest
+{
+    protected function setUp()
+    {
+        $this->cache = new Psr6Cache(new ArrayAdapter());
+    }
+
+    public function testNameCollision()
+    {
+        $metadata = new ClassMetadata('Foo\\Bar');
+
+        $this->cache->write($metadata);
+        $this->assertFalse($this->cache->has('Foo_Bar'));
+    }
+}