1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-29 08:49:50 +02:00

new directory structure, moved to /src

This commit is contained in:
David Grudl
2015-01-13 16:27:01 +01:00
parent c96271c09b
commit 2522dcd7fe
74 changed files with 60 additions and 70 deletions

View File

@@ -0,0 +1,30 @@
<?php
use Tester\Assert;
require __DIR__ . '/bootstrap.php';
$conn = new DibiConnection($config);
$arr = array(
'title' => 'Super Product',
'price' => 12,
'brand' => NULL,
);
$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
);