@@ 74-85 (lines=12) @@ | ||
71 | $this->assertBinaryContains('test2'); |
|
72 | } |
|
73 | ||
74 | private function assertBinaryContains($text) |
|
75 | { |
|
76 | $rows = $this->_conn->fetchAll('SELECT * FROM blob_table'); |
|
77 | ||
78 | self::assertEquals(1, count($rows)); |
|
79 | $row = array_change_key_case($rows[0], CASE_LOWER); |
|
80 | ||
81 | $blobValue = Type::getType('binary')->convertToPHPValue($row['binaryfield'], $this->_conn->getDatabasePlatform()); |
|
82 | ||
83 | self::assertInternalType('resource', $blobValue); |
|
84 | self::assertEquals($text, stream_get_contents($blobValue)); |
|
85 | } |
|
86 | ||
87 | private function assertBlobContains($text) |
|
88 | { |
|
@@ 87-98 (lines=12) @@ | ||
84 | self::assertEquals($text, stream_get_contents($blobValue)); |
|
85 | } |
|
86 | ||
87 | private function assertBlobContains($text) |
|
88 | { |
|
89 | $rows = $this->_conn->fetchAll('SELECT * FROM blob_table'); |
|
90 | ||
91 | self::assertEquals(1, count($rows)); |
|
92 | $row = array_change_key_case($rows[0], CASE_LOWER); |
|
93 | ||
94 | $blobValue = Type::getType('blob')->convertToPHPValue($row['blobfield'], $this->_conn->getDatabasePlatform()); |
|
95 | ||
96 | self::assertInternalType('resource', $blobValue); |
|
97 | self::assertEquals($text, stream_get_contents($blobValue)); |
|
98 | } |
|
99 | } |
|
100 |