/** * @test */ public function it_returns_the_expected_results_with_single_result() { $converter_mock = TestFactory::mockConverter(); $converter_mock->shouldReceive('setApi')->withAnyArgs()->andReturnSelf()->once(); $converter_mock->shouldReceive('setColumns')->withAnyArgs()->andReturnSelf()->once(); $converter_mock->shouldReceive('process')->withAnyArgs()->andReturn(1)->once(); $client = (new Client($this->buildConfig(), $converter_mock))->setApiNamespace('Spinen\\ConnectWise\\Client\\Stubs')->setApi('SomeApi')->setMethod('FunctionCall'); $this->assertEquals(1, $client->execute(['key' => 'value'])); }