Anthocnt Posted June 14, 2022 Share Posted June 14, 2022 Hello! I develop a Prestashop module and I would like to create some tests with phpunit. I don't know why but some methods like dump() are not loaded properly.. tests/KernelTest.php <?php namespace PrestaShop\Module\MyModule\Tests; use Nette\DI\Container; use PHPUnit\Framework\TestCase; class KernelTest extends TestCase { public function testKernel() { dump(Container::class); $this->assertTrue(true); } } The following code returns :Error: Call to undefined function PrestaShop\Module\MyModule\Tests\dump() I use the PSR-4 composer autoloader, everything else is worklng perfecly (yet). I tried to download the symfony/var-dumper() package but it doesn't solve anything.. This is my PSR-4 configuration: "autoload": { "psr-4": { "PrestaShop\\Module\\MyModule\\": "src/", "PrestaShop\\Module\\MyModule\\Tests\\": "tests/" }, `src` and `tests` folders are at the root of my module. Anyone can tell me what's wrong? Thank you! Link to comment Share on other sites More sharing options...
Janett Posted June 14, 2022 Share Posted June 14, 2022 https://github.com/PrestaShop/PrestaShop/blob/1.7.8.6/config/alias.php Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now