Witam
Gdy chce przetestować klasę w symfony wyskakuje mi że nie odnajduje klasy, a PHPStorm podpowiada mi całą ścieżkę i od razu ją wstawia, nie wiem co może być nie tak.
namespace App\Tests\Service;
use App\Service\RecipeService;
use PHPUnit\Framework\TestCase;
class RecipeServiceTest extends TestCase
{
/**
* @var RecipeService
*/
private $recipeService;
protected function setUp()
{
$this->recipeService = new RecipeService();
}
protected function tearDown()
{
$this->recipeService = null;
}
public function testGetOneRecipeById()
{
$result = $this->recipeService->getOneRecipeById();
$this->assertTrue($result);
}
}
namespace App\Service;
class RecipeService
{
public function getOneRecipeById()
{
return true;
}
}
Błąd który sie wyświetla: Error : Class 'App\Service\RecipeService' not found , linijka z $this->recipeService = new RecipeService();
próbowałem zrobić composer dump-autoload ale to nic nie dało, dodawałem / (use \App\Service\RecipeService;) ale też nic nie dało