convertToDatabaseValue() публичный Метод

Converts a value from its PHP representation to its database representation of this type.
public convertToDatabaseValue ( array $array, Doctrine\DBAL\Platforms\AbstractPlatform $platform ) : mixed
$array array The value to convert.
$platform Doctrine\DBAL\Platforms\AbstractPlatform The currently used database platform.
Результат mixed The database representation of the value.
 /**
  * @test
  */
 public function passSimpleArrayAndConvertToJson()
 {
     $json = $this->jsonArrayTypeMock->convertToDatabaseValue(['simplestring', 1, ['nestedArray']], $this->abstractPlatformMock);
     $this->assertEquals("{\n    \"0\": \"simplestring\",\n    \"1\": 1,\n    \"2\": {\n        \"0\": \"nestedArray\"\n    }\n}", $json);
 }