I have 2 classes: \App\Services\WeatherService and \App\Services\WeatherService1 both are equal.
In my \Tests\Unit\Services\WeatherServiceTest I'm trying to make a new instance, but I can't instantiate \App\Services\WeatherService.
//Works perfect
$some = new WeatherService1(new \Forecast\Forecast(config('darksky.key')));
dd($some);
/*
App\Services\WeatherService1 {#2405
-forecastApi: Forecast\Forecast {#2406
-api_key: "somekey"
}
}
*/
And original weather service gives
//Not working
$some = new WeatherService(new \Forecast\Forecast(config('darksky.key')));
dd($some); //app\Services\WeatherService {#2405}
What could be done to solve this issue?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire