Rajout de doctrine/orm
[zf2.biz/application_blanche.git] / vendor / doctrine / dbal / tests / Doctrine / Tests / DBAL / Types / GuidTypeTest.php
diff --git a/vendor/doctrine/dbal/tests/Doctrine/Tests/DBAL/Types/GuidTypeTest.php b/vendor/doctrine/dbal/tests/Doctrine/Tests/DBAL/Types/GuidTypeTest.php
new file mode 100644 (file)
index 0000000..0f61183
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+
+namespace Doctrine\Tests\DBAL\Types;
+
+use Doctrine\DBAL\Types\Type;
+use Doctrine\Tests\DBAL\Mocks;
+
+class GuidTest extends \Doctrine\Tests\DbalTestCase
+{
+    protected
+        $_platform,
+        $_type;
+
+    protected function setUp()
+    {
+        $this->_platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform();
+        $this->_type = Type::getType('guid');
+    }
+
+    public function testConvertToPHPValue()
+    {
+        $this->assertInternalType("string", $this->_type->convertToPHPValue("foo", $this->_platform));
+        $this->assertInternalType("string", $this->_type->convertToPHPValue("", $this->_platform));
+    }
+
+    public function testNullConversion()
+    {
+        $this->assertNull($this->_type->convertToPHPValue(null, $this->_platform));
+    }
+}
+