@@ 54-61 (lines=8) @@ | ||
51 | self::assertSame(array(), $this->type->convertToPHPValue('', $this->platform)); |
|
52 | } |
|
53 | ||
54 | public function testJsonStringConvertsToPHPValue() |
|
55 | { |
|
56 | $value = array('foo' => 'bar', 'bar' => 'foo'); |
|
57 | $databaseValue = json_encode($value); |
|
58 | $phpValue = $this->type->convertToPHPValue($databaseValue, $this->platform); |
|
59 | ||
60 | self::assertEquals($value, $phpValue); |
|
61 | } |
|
62 | ||
63 | public function testJsonResourceConvertsToPHPValue() |
|
64 | { |
@@ 54-61 (lines=8) @@ | ||
51 | self::assertNull($this->type->convertToPHPValue('', $this->platform)); |
|
52 | } |
|
53 | ||
54 | public function testJsonStringConvertsToPHPValue() |
|
55 | { |
|
56 | $value = array('foo' => 'bar', 'bar' => 'foo'); |
|
57 | $databaseValue = json_encode($value); |
|
58 | $phpValue = $this->type->convertToPHPValue($databaseValue, $this->platform); |
|
59 | ||
60 | self::assertEquals($value, $phpValue); |
|
61 | } |
|
62 | ||
63 | /** @dataProvider providerFailure */ |
|
64 | public function testConversionFailure($data) |