1: <?php
2:
3: namespace Alchemy\tests;
4: use Alchemy\core\schema\Table;
5: use Alchemy\core\query\Query;
6: use Alchemy\dialect\ANSICompiler;
7:
8:
9: class ANSIDeleteTest extends BaseTest {
10:
11: public function testSimpleDelete() {
12: $users = Table::Core('users', array(
13: 'columns' => array(
14: 'UserName' => 'String',
15: 'Email' => 'String')
16: ));
17:
18: $users = $users->getRef();
19:
20: $query = Query::Delete($users)
21: ->where($users->Email->equal("user@example.com"));
22:
23: $ansi = new ANSICompiler();
24: $vern = $ansi->compile($query, array('alias_tables' => true));
25:
26: $this->assertExpectedString('ANSIDeleteTest-1.sql', $vern);
27: }
28: }
29: