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