run Test Command in Aimeos

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
makkam
Posts: 12
Joined: 13 Nov 2020, 12:10

run Test Command in Aimeos

Post by makkam » 17 Jan 2021, 16:06

is that possible when I test OmniPayTest.php I receive 25 errors !
why it doesn't recognize TestHelper even it run the bootstrap.php that belongs to ext/ai-payment !
I run the test like that :
./vendor/bin/phpunit --configuration ext/ai-payments/lib/custom/tests/phpunit.xml ext/ai-payments/lib/custom/tests/MShop/Service/Provider/Payment/OmniPayTest.php

neither : php artisan aimeos:setup unittest unittest
allows me to specified which Test class I need to run !
any help ?

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

Re: run Test Command in Aimeos

Post by aimeos » 17 Jan 2021, 17:18

You forgot the "--bootstrap vendor/autoload.php" part:

Code: Select all

./vendor/bin/phpunit --bootstrap=vendor/autoload.php -c
ext/ai-payments/lib/custom/tests/phpunit.xml
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

makkam
Posts: 12
Joined: 13 Nov 2020, 12:10

Re: run Test Command in Aimeos

Post by makkam » 20 Jan 2021, 04:40

thanks for reply ..
aimeos wrote: 17 Jan 2021, 17:18 You forgot the "--bootstrap vendor/autoload.php" part:

Code: Select all

./vendor/bin/phpunit --bootstrap=vendor/autoload.php -c
ext/ai-payments/lib/custom/tests/phpunit.xml
I tried it : $ ./vendor/bin/phpunit --bootstrap=vendor/autoload.php -c ext/ai-payments/lib/custom/tests/phpunit.xml
it still give me that 86 errors as it didn't recognized autoload :(

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

Re: run Test Command in Aimeos

Post by aimeos » 20 Jan 2021, 13:00

Here's the documentation how to setup the environment for testing so it works without problems:
https://aimeos.org/docs/latest/develope ... sion-tests

Make sure, you add the packages required by the extensions to your root composer.json file and run "composer up" afterwards.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply