Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

#89 - unit tests #104

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

#89 - unit tests #104

wants to merge 13 commits into from

Conversation

Anna-Sokolowska
Copy link
Contributor

@Anna-Sokolowska Anna-Sokolowska commented May 6, 2022

I created basic tests. Hence I also fix organization profile routes and change admin invitation receiver.

@Anna-Sokolowska Anna-Sokolowska linked an issue May 6, 2022 that may be closed by this pull request
@Anna-Sokolowska Anna-Sokolowska self-assigned this May 6, 2022
{
public function createApplication(): Application
{
$app = require __DIR__ . "/../bootstrap/app.php";
Copy link
Member

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.

Copy link
Contributor Author

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".

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

@Anna-Sokolowska Anna-Sokolowska marked this pull request as ready for review May 11, 2022 15:30
Copy link
Member

@EwelinaSkrzypacz EwelinaSkrzypacz left a 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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unit tests
3 participants