private function setUpMocks() { $this->client_mock = TestFactory::mockClient(); $this->filter_mock = TestFactory::mockFilter(); $this->filter_mock->shouldReceive('getOperators')->andReturn(['!=' => 'NotEquals', '<=' => 'LessThanEquals', '>=' => 'GreaterThanEquals', '=' => 'Equals', '<' => 'LessThan', '>' => 'GreaterThan', 'contains' => 'Contains', 'like' => 'Like']); foreach (['set', 'orderBy', 'where', 'whereRaw'] as $method) { $this->filter_mock->shouldReceive('isCoreMethod')->with($method)->andReturn(true); } // All others are false $this->filter_mock->shouldReceive('isCoreMethod')->withAnyArgs()->andReturn(false); // $this->filter_mock->shouldReceive('orderBy') // ->andReturnSelf(); // $this->filter_mock->shouldReceive('where') // ->andReturnSelf(); // $this->filter_mock->shouldReceive('whereRaw') // ->andReturnSelf(); }
private function setUpMocks() { $this->client_mock = TestFactory::mockClient(); $this->validator_mock = TestFactory::mockValidator(); }