Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/Controller/DefaultControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ public function testPublicUrls(string $url): void
}

/**
* A good practice for tests is to not use the service container, to make
* A good practice for such tests is to not use the service container, to make
* them more robust. However, in this example we must access to the container
* to get the entity manager and make a database query. The reason is that
* blog post fixtures are randomly generated and there's no guarantee that
* a given blog post slug will be available.
* You can also make some integration test to test services logic.
* See https://symfony.com/doc/current/testing.html#integration-tests
*/
public function testPublicBlogPost(): void
{
Expand Down