mirror of
https://github.com/elyby/accounts.git
synced 2024-12-02 11:41:05 +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);
|
|
}
|
|
|
|
}
|