protected function getDataProvider() { if (!$this->provider) { $builder = new QueryBuilder(Connection::get()); $builder->select('*')->from('test_users'); $this->provider = new DoctrineDataProvider($builder); } return $this->provider; }
public function setUp() { $builder = new QueryBuilder(Connection::get()); $builder->select('*')->from('test_users'); $this->data = $builder->execute()->fetchAll(\PDO::FETCH_OBJ); $this->operations = new OperationCollection(); $this->service = new DoctrineProcessingService(new DoctrineProcessorResolver(), $this->operations, $builder); $this->totalCount = (new QueryBuilder(Connection::get()))->select('count(*)')->from('test_users')->execute()->fetchColumn(); self::assertTrue($this->totalCount > 0); }