How to test the extension classes ?

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
dheeraj
Posts: 26
Joined: 02 Jan 2021, 08:47

Re: How to test the extension classes ?

Post by dheeraj » 12 Jun 2021, 10:03

Hello.
I am getting an error while executing some test cases in which TestHelper class is used.
This error comes with aimeos extensions too.

Code: Select all

PHP Warning:  Uncaught require_once(Bootstrap.php): failed to open stream: No such file or directory
The error is occurring due to the statement require_once('Bootstrap.php') in the TestHelper class in the extension but
this Bootstrap.php is only present in the aimeos-core package and not in any of the extensions (custom + ai-*).

As a reminder, i am testing extensions directly in the project instead of copying extensions to a cloned aimeos-core repo.
The test command that i am executing is below :-

Code: Select all

vendor/bin/phpunit --bootstrap=vendor/autoload.php -c ext/ext-custom/lib/custom/tests/phpunit.xml

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: How to test the extension classes ?

Post by aimeos » 16 Jun 2021, 08:51

That's strange because composer (used by including vendor/autoload.php) should know the \Aimeos\Bootstrap class located in vendor/aimeos/aimeos-core/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply