Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | |||
10 | class GuidTypeTest extends DbalTestCase |
||
11 | { |
||
12 | /** |
||
13 | * @var MockPlatform |
||
14 | */ |
||
15 | protected $_platform; |
||
16 | |||
17 | /** |
||
18 | * @var Type |
||
19 | */ |
||
20 | protected $_type; |
||
21 | |||
22 | protected function setUp() |
||
23 | { |
||
24 | $this->_platform = new MockPlatform(); |
||
25 | $this->_type = Type::getType('guid'); |
||
26 | } |
||
27 | |||
28 | public function testConvertToPHPValue() |
||
29 | { |
||
30 | self::assertInternalType("string", $this->_type->convertToPHPValue("foo", $this->_platform)); |
||
31 | self::assertInternalType("string", $this->_type->convertToPHPValue("", $this->_platform)); |
||
32 | } |
||
33 | |||
34 | public function testNullConversion() |
||
37 | } |
||
38 | |||
39 | public function testNativeGuidSupport() |
||
40 | { |
||
41 | self::assertTrue($this->_type->requiresSQLCommentHint($this->_platform)); |
||
42 | |||
43 | $mock = $this->createMock(get_class($this->_platform)); |
||
44 | $mock->expects($this->any()) |
||
45 | ->method('hasNativeGuidType') |
||
46 | ->will($this->returnValue(true)); |
||
47 | |||
48 | self::assertFalse($this->_type->requiresSQLCommentHint($mock)); |
||
51 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.