Example #1
0
 /**
  * @dataProvider applyTestCases
  *
  * @param mixed  $from
  * @param string $expectedQuery
  */
 public function testApply($from, $expectedQuery)
 {
     $query = new Query();
     $query->from($from);
     $this->aclHelper->apply($query);
     $this->assertEquals($expectedQuery, $query->getStringQuery());
 }
Example #2
0
 /**
  * Do query manipulations such as ACL apply etc.
  *
  * @param Query $query
  */
 protected function prepareQuery(Query $query)
 {
     $this->applyModesBehavior($query);
     $this->searchAclHelper->apply($query);
 }