public function testFetchRowsDataProvider()
 {
     $crit1 = new CriteriaBase();
     $crit1->setFields(array('id', 'name', 'email', 'created_at', 'updated_at'));
     $crit1->setSort('id', false);
     $crit1->eq('id', array(1));
     $crit2 = new CriteriaBase();
     $crit2->setFields(array('id', 'name', 'email', 'created_at', 'updated_at'));
     $crit2->setSort('id', false);
     $crit2->gt('id', array(0));
     $crit3 = new CriteriaBase();
     $crit3->setFields(array('id', 'name', 'email', 'created_at', 'updated_at'));
     $crit3->setSort('id', false);
     $crit3->lt('id', array(2));
     $crit4 = new CriteriaBase();
     $crit4->setFields(array('id', 'name', 'email', 'created_at', 'updated_at'));
     $crit4->setSort('id', false);
     $crit4->startsWith('name', array('Co'));
     $crit5 = new CriteriaBase();
     $crit5->setFields(array('id', 'name', 'email', 'created_at', 'updated_at'));
     $crit5->setSort('id', false);
     $crit5->endsWith('name', array('isher'));
     $crit6 = new CriteriaBase();
     $crit6->setFields(array('id', 'name', 'email', 'created_at', 'updated_at'));
     $crit6->setSort('id', false);
     $crit6->search('name', array('ory Fis'));
     $crit7 = new CriteriaBase();
     $crit7->setFields(array('id', 'name', 'email', 'created_at'));
     $crit7->addField('updated_at');
     $crit7->setSort('id', false);
     $crit7->startsWith('name', array('Co', 'Cor'));
     return [[$crit1, 'Equals Test'], [$crit2, 'Greater Than Test'], [$crit3, 'Less Than Test'], [$crit4, 'Starts With Test'], [$crit5, 'Ends With Test'], [$crit6, 'Search Test'], [$crit7, 'OR Test']];
 }
Пример #2
0
 public function testExecDataProvider()
 {
     $testCriteria1 = new CriteriaBase();
     $testCriteria1->eq('id', 1);
     $testCriteria1->setLimit(1);
     $testCriteria2 = new CriteriaBase();
     $testCriteria2->ne('id', 1);
     $testCriteria2->setLimit(1);
     return [[$testCriteria1], [$testCriteria2]];
 }