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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class not found even after autoloading classmap in autoload-dev #228

Closed
introwit opened this Issue Sep 8, 2018 · 1 comment

Comments

2 participants
@introwit

introwit commented Sep 8, 2018

Hi, Thank you for Testbench 馃檪

  • I am creating a mailable class in the setUp method of my test class.
  • As expected it is created in the vendor/orchestra/testbench-core/laravel/app/Mail directory.
  • To use that mail class in one my test methods I do app()->getNamespace() . Mail\\TheClassName
  • But test fails saying Class App\Mail\TheClassName not found

I have already added the vendor/orchestra/testbench-core/laravel/ to the classmap of autoload-dev still the problem persists when running the tests on a fresh deploy to a CI service.

If I am doing it wrong, can you help me out on whats the right way to access the mail class created in the setUp method to use in other methods of the test? Thanks :)

@crynobone

This comment has been minimized.

Show comment
Hide comment
@crynobone

crynobone Sep 8, 2018

Member

Shouldn't classmap require composer dump-autoload before composer start accepting the class

Member

crynobone commented Sep 8, 2018

Shouldn't classmap require composer dump-autoload before composer start accepting the class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment