mirror of
https://github.com/dg/dibi.git
synced 2025-08-15 02:25:10 +02:00
moved to namespace Dibi
added loader for old class names
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
<?php
|
||||
|
||||
use Tester\Assert;
|
||||
use Dibi\Fluent;
|
||||
|
||||
require __DIR__ . '/bootstrap.php';
|
||||
|
||||
|
||||
$conn = new DibiConnection($config);
|
||||
$conn = new Dibi\Connection($config);
|
||||
|
||||
$fluent = new DibiFluent($conn);
|
||||
$fluent = new Fluent($conn);
|
||||
$fluent->select('*')->from('table')->where('x=1');
|
||||
$dolly = clone $fluent;
|
||||
$dolly->where('y=1');
|
||||
@@ -17,7 +18,7 @@ Assert::same(reformat('SELECT * FROM [table] WHERE x=1'), (string) $fluent);
|
||||
Assert::same(reformat('SELECT * FROM [table] WHERE x=1 AND y=1 FOO'), (string) $dolly);
|
||||
|
||||
|
||||
$fluent = new DibiFluent($conn);
|
||||
$fluent = new Fluent($conn);
|
||||
$fluent->select('id')->from('table')->where('id = %i', 1);
|
||||
$dolly = clone $fluent;
|
||||
$dolly->where('cd = %i', 5);
|
||||
@@ -26,7 +27,7 @@ Assert::same(reformat('SELECT [id] FROM [table] WHERE id = 1'), (string) $fluent
|
||||
Assert::same(reformat('SELECT [id] FROM [table] WHERE id = 1 AND cd = 5'), (string) $dolly);
|
||||
|
||||
|
||||
$fluent = new DibiFluent($conn);
|
||||
$fluent = new Fluent($conn);
|
||||
$fluent->select('*')->from('table');
|
||||
$dolly = clone $fluent;
|
||||
$dolly->removeClause('select')->select('count(*)');
|
||||
|
Reference in New Issue
Block a user