Skip to content

Commit

Permalink
test: Added New Test Case
Browse files Browse the repository at this point in the history
  • Loading branch information
usernane committed May 21, 2024
1 parent c77ec70 commit cfe77ac
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/webfiori/database/tests/mssql/MSSQLQueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,16 @@ public function testSelectWithWhere012() {
// Expr(Expr(Cond) Cond)
$this->assertEquals('select * from [users] where [users].[id] is null and [users].[id] is not null', $schema->getLastQuery());
}
/**
* @test
*/
public function testSelectWithWhere000() {
$schema = new MSSQLTestSchema();
$bulder = $schema->table('users')->select()->where('id', 66);
$this->assertEquals('select * from [users] where [users].[id] = ?', $schema->getLastQuery());
$bulder->getTable()->getSelect()->addWhere(new Expression('year(x)'), new Expression('in(300)'));
$this->assertEquals('select * from [users] where [users].[id] = ? and year(x) in(300) group by [users].[first_name], [users].[last_name]', $schema->getLastQuery());
}
/**
* @test
*
Expand Down

0 comments on commit cfe77ac

Please sign in to comment.