Missing classes during testing #1150
samcoppock
started this conversation in
General
Replies: 1 comment
-
@samcoppock are you able to replicate this in a fresh install of Winter? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Ive got a number of classes which are missing during testing plugins. ( they work during normal code use )
all of the missing classes use contain bindings.
Ie in the plugin.php file we have something like
$app->bind('MyClassName', function({
return new MyClassName
}));
and in the class being tested we will have
$myClass = $app->make('MyClassName');
and the test fails because it thinks 'MyClassName' cant be found
the odd thing is I have found some uses of classes which are fetched from the service container which do not get reported as missing during tests.
However if I replace $app->make with new MyClassName; it works. This shows that the composer class autoloader functionality is working find but the service container for some reason is not loading all the classes.
Any ideas what could be causing this?
Beta Was this translation helpful? Give feedback.
All reactions