X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fpq-gateway;a=blobdiff_plain;f=tests%2Flib%2Fpq%2FGateway%2FCellTest.php;h=8ec28598ad220ff489ca8e3d1bf7c955125f9ea1;hp=de57a4fbcc7f25e91eaa6628382a88d3599c5adf;hb=80c4d645e1650304b1dbcae85dbf17a6593896e4;hpb=c236ef4b1efd3f5d3a03a390f9a3721b06fa1e72 diff --git a/tests/lib/pq/Gateway/CellTest.php b/tests/lib/pq/Gateway/CellTest.php index de57a4f..8ec2859 100644 --- a/tests/lib/pq/Gateway/CellTest.php +++ b/tests/lib/pq/Gateway/CellTest.php @@ -77,7 +77,8 @@ class CellTest extends \PHPUnit_Framework_TestCase { $row->list = [$row->list->get()]; $row->update(); $this->assertEquals([[0,1,2]], $row->list->get()); - $this->setExpectedException("PHPUnit_Framework_Error_Notice", "Indirect modification of overloaded element of pq\Gateway\Cell has no effect"); + $this->setExpectedException("PHPUnit_Framework_Error_Notice", + "Indirect modification of overloaded element of pq\Gateway\Cell has no effect"); $row->list[0][0] = -1; } @@ -99,19 +100,19 @@ class CellTest extends \PHPUnit_Framework_TestCase { } } -class Hstore implements \pq\ConverterInterface +class Hstore implements \pq\Converter { protected $types; function __construct(\pq\Types $types) { - $this->types = $types; + $this->types = $types["hstore"]->oid; } function convertTypes() { - return [$this->types["hstore"]->oid]; + return [$this->types]; } - function convertFromString($string) { + function convertFromString($string, $type) { return eval("return [$string];"); } - function convertToString($data) { + function convertToString($data, $type) { $string = ""; foreach ($data as $k => $v) { $string .= "\"".addslashes($k)."\"=>";