2015-01-12 05:33:41 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Tester\Assert;
|
|
|
|
|
|
|
|
require __DIR__ . '/bootstrap.php';
|
|
|
|
|
|
|
|
|
|
|
|
$conn = new DibiConnection($config);
|
|
|
|
|
|
|
|
|
|
|
|
$arr = array(
|
2015-06-19 03:11:36 +02:00
|
|
|
'title' => 'Super Product',
|
|
|
|
'price' => 12,
|
|
|
|
'brand' => NULL,
|
2015-01-12 05:33:41 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
$fluent = $conn->update('table', $arr)
|
|
|
|
->setFlag('IGNORE')->setFlag('DELAYED');
|
|
|
|
|
|
|
|
Assert::same(
|
|
|
|
reformat('UPDATE IGNORE DELAYED [table] SET [title]=\'Super Product\', [price]=12, [brand]=NULL'),
|
|
|
|
(string) $fluent
|
|
|
|
);
|
|
|
|
|
|
|
|
$fluent->set(array('another' => 123));
|
|
|
|
|
|
|
|
Assert::same(
|
|
|
|
reformat('UPDATE IGNORE DELAYED [table] SET [title]=\'Super Product\', [price]=12, [brand]=NULL , [another]=123'),
|
|
|
|
(string) $fluent
|
|
|
|
);
|