Esempio n. 1
0
 public function testSetFilters()
 {
     $query = m::mock('Illuminate\\Database\\Query\\Builder');
     $countQuery = m::mock('Illuminate\\Database\\Query\\Builder');
     $filters = array(array('field_name' => 1), array('field_name' => 2), array('field_name' => 3));
     $field = m::mock('Frozennode\\Administrator\\Fields\\Field');
     $field->shouldReceive('setFilter')->times(3)->shouldReceive('filterQuery')->times(6);
     $this->fieldFactory->shouldReceive('findFilter')->times(3)->andReturn($field);
     $selects = array();
     $this->dataTable->setFilters($filters, $query, $countQuery, $selects);
 }