Commit fb175f06 authored by Terje Bråten's avatar Terje Bråten Committed by Steve Müller

Added a unit test for the type JsonArray, to test empty string conversion.

parent 421cc333
...@@ -48,6 +48,11 @@ class JsonArrayTest extends \Doctrine\Tests\DbalTestCase ...@@ -48,6 +48,11 @@ class JsonArrayTest extends \Doctrine\Tests\DbalTestCase
$this->assertSame(array(), $this->type->convertToPHPValue(null, $this->platform)); $this->assertSame(array(), $this->type->convertToPHPValue(null, $this->platform));
} }
public function testJsonEmptyStringConvertsToPHPValue()
{
$this->assertSame(array(), $this->type->convertToPHPValue('', $this->platform));
}
public function testJsonStringConvertsToPHPValue() public function testJsonStringConvertsToPHPValue()
{ {
$value = array('foo' => 'bar', 'bar' => 'foo'); $value = array('foo' => 'bar', 'bar' => 'foo');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment