-
Notifications
You must be signed in to change notification settings - Fork 2
#89 - unit tests #104
base: main
Are you sure you want to change the base?
#89 - unit tests #104
Conversation
{ | ||
public function createApplication(): Application | ||
{ | ||
$app = require __DIR__ . "/../bootstrap/app.php"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need bootstrapping file. You can bootstrap application from Blumilk\Meetup\Core\MeetupApplication
class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I get the RuntimeException "A facade root has not been set".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What facade do you want to use and where?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nowhere, I just create object of MeetupApplication class and use getApplication method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't get it. Behat tests were working fine with this packaged app approach. Please take care about removing /bootstrap/app.php
file and wire application in your test cases bootstrap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add more "unhappy path" tests - for example what should happen, if admin sends invitation without e-mail? Or admin should be able to create meetup in the past?
I created basic tests. Hence I also fix organization profile routes and change admin invitation receiver.