Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / dbal / tests / Doctrine / Tests / DBAL / Types / GuidTypeTest.php
1 <?php
2
3 namespace Doctrine\Tests\DBAL\Types;
4
5 use Doctrine\DBAL\Types\Type;
6 use Doctrine\Tests\DBAL\Mocks;
7
8 class GuidTest extends \Doctrine\Tests\DbalTestCase
9 {
10     protected
11         $_platform,
12         $_type;
13
14     protected function setUp()
15     {
16         $this->_platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform();
17         $this->_type = Type::getType('guid');
18     }
19
20     public function testConvertToPHPValue()
21     {
22         $this->assertInternalType("string", $this->_type->convertToPHPValue("foo", $this->_platform));
23         $this->assertInternalType("string", $this->_type->convertToPHPValue("", $this->_platform));
24     }
25
26     public function testNullConversion()
27     {
28         $this->assertNull($this->_type->convertToPHPValue(null, $this->_platform));
29     }
30 }
31