Skip to content
This repository has been archived by the owner on May 28, 2023. It is now read-only.

Commit

Permalink
Do not use statetment in Abstract translator for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
percymamedy committed Feb 4, 2016
1 parent 7101c78 commit cc972ee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/AbstractTranslator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;
use FindBrok\WatsonTranslate\Tests\Mocks\MockResponses;
use FindBrok\WatsonTranslate\Presenters\ResultsCollection;

/**
Expand Down Expand Up @@ -93,9 +92,9 @@ public function __construct()
public function __call($method, $parameters)
{
//Check if this is a pretend method for mocking responses
if(method_exists(new MockResponses, $method)) {
if(method_exists(new \FindBrok\WatsonTranslate\Tests\Mocks\MockResponses, $method)) {
//Call pretend method
$this->response = call_user_func_array([new MockResponses, $method], $parameters);
$this->response = call_user_func_array([new \FindBrok\WatsonTranslate\Tests\Mocks\MockResponses, $method], $parameters);
//Add results to class
$this->results = $this->response->getBody()->getContents();
//Return the object
Expand Down

0 comments on commit cc972ee

Please sign in to comment.