Browse Source

Fixed test

tags/2.0.14
Alexander Makarov 7 years ago
parent
commit
17186b24c1
No known key found for this signature in database
GPG Key ID: 3617B79C6A325E4A
  1. 4
      tests/framework/db/QueryTest.php

4
tests/framework/db/QueryTest.php

@ -46,12 +46,12 @@ abstract class QueryTest extends DatabaseTestCase
$this->assertEquals(['user'], $query->from);
}
public function testFromTableIsExpression()
public function testFromTableIsArrayWithExpression()
{
$query = new Query();
$tables = new Expression('(SELECT id,name FROM user) u');
$query->from($tables);
$this->assertInstanceOf('\yii\db\Expression', $query->from);
$this->assertInstanceOf('\yii\db\Expression', $query->from[0]);
}
use GetTablesAliasTestTrait;

Loading…
Cancel
Save