* @since 2.0 */ class ActiveDataProviderTest extends DatabaseTestCase { protected function setUp() { parent::setUp(); ActiveRecord::$db = $this->getConnection(); } public function testActiveQuery() { $provider = new ActiveDataProvider(array( 'query' => Order::find(), )); $orders = $provider->getItems(); $this->assertEquals(3, count($orders)); $provider = new ActiveDataProvider(array( 'query' => Order::find(), 'pagination' => array( 'pageSize' => 2, ) )); $orders = $provider->getItems(); $this->assertEquals(2, count($orders)); } public function testQuery() { } }