简体   繁体   中英

Oxid's testing library cannot open file AllTestsUnit.php

for the oxid eshop I'm working on I implemented the Oxid testing library with composer into another directory. The shop is (locally) running in an apache docker container and the structure in it is the following:

/var/www/
|
| - html/ <Shop Document Root>
|    |
|    | ...
|    |
|
| - tests/ <Directory where tests reside>
|    |
|    | - vendor/
|    |
|    | ...

From /var/www/ I run tests/vendor/bin/runtests and get the following output:

Cannot open file "AllTestsUnit.php"

I resolved this by adding the absolute path to this file to the appropriate places in runtests but I don't want to use this 'hack' as I don't want to modify the file every time I install the library.

To avoid this I tried putting the path into php.ini's include_path, which by now looks like the following:

include_path=".:/var/www/tests/vendor/oxid-esales/testing-library/"

I tried this in many variations (no trailing slash, using single quotes, ...) but nothing seems to work. The funny thing about this, is that it worked before but doesn't now. With the exact same configuration as before (I checked with my local history in PHPStorm).

Did anyone have the same or similar troubles getting the library to work? If not, does anyone else have an idea what I'm doing wrong?

Thanks in advance for any help.

Ok. I still don't know why it suddenly didn't work, but I resolved it.

I put AllTestsUnit.php and AllTestsSelenium.php in composer's autoloader (the file section) and it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM