mirror of
https://github.com/elyby/accounts.git
synced 2024-12-05 04:58:56 +05:30
17 lines
457 B
PHP
17 lines
457 B
PHP
|
<?php
|
||
|
namespace codeception\common\unit\db\mysql;
|
||
|
|
||
|
use common\db\mysql\QueryBuilder;
|
||
|
use tests\codeception\common\unit\TestCase;
|
||
|
use Yii;
|
||
|
|
||
|
class QueryBuilderTest extends TestCase {
|
||
|
|
||
|
public function testBuildOrderByField() {
|
||
|
$queryBuilder = new QueryBuilder(Yii::$app->db);
|
||
|
$result = $queryBuilder->buildOrderBy(['dummy' => ['first', 'second']]);
|
||
|
$this->assertEquals("ORDER BY FIELD(`dummy`,'first','second')", $result);
|
||
|
}
|
||
|
|
||
|
}
|