Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hello 。When I run phpunit, this error occurs. How can I solve it? Thank you #420

Closed
sunmengkai opened this issue Jan 11, 2021 · 2 comments

Comments

@sunmengkai
Copy link

image

@sunmengkai
Copy link
Author

There was 1 error:

  1. Error
    The data provider specified for DesignPatterns\Creational\AbstractFactory\Tests\AbstractFactoryTest::testCanCreateCsvWriterOnUnix is invalid.
    Error: Class 'DesignPatterns\Creational\AbstractFactory\UnixWriterFactory' not found
    E:\phpstudy\phpstudy_pro\WWW\index\DesignPatterns\Creational\AbstractFactory\Tests\AbstractFactoryTest.php:17

ERRORS!
Tests: 1, Assertions: 0, Errors: 1.

@domnikl
Copy link
Contributor

domnikl commented Jan 23, 2021

Hi @sunmengkai,
based on your directory structure, you are not running phpunit from the repository root, thus not loading the phpunit.xml.dist configuration which contains the bootstrap (composer's autoloader). Please either run it in the correct directory or explicitely load the configuration file.

@domnikl domnikl closed this as completed Jan 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants