File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -11,4 +11,7 @@ modules:
11
11
- Symfony :
12
12
app_path : ' src'
13
13
environment : ' tests'
14
+ - Doctrine2 :
15
+ depends : Symfony
16
+ cleanup : true
14
17
- \App\Tests\Helper\Functional
Original file line number Diff line number Diff line change 1
1
<?php use App \Tests \FunctionalTester ;
2
2
$ I = new FunctionalTester ($ scenario );
3
3
$ I ->am ('Anonymous ' );
4
+ $ I ->wantTo ('open blog post 1 by slug and see title ' );
4
5
5
- /** @var \Doctrine\ORM\EntityManager $em */
6
- $ em = $ I ->grabService ('doctrine ' );
7
- /** @var \App\Repository\PostRepository $repository */
8
- $ repository = $ em ->getRepository (\App \Entity \Post::class);
9
6
/** @var \App\Entity\Post $blogPost */
10
- $ blogPost = $ repository -> find ( 1 );
7
+ $ blogPost = $ I -> grabEntityFromRepository (\ App \ Entity \Post::class, [ ' id ' => 1 ] );
11
8
$ url = sprintf ('/en/blog/posts/%s ' , $ blogPost ->getSlug ());
12
9
13
- $ I ->wantTo ('open blog post by slug and see result ' );
14
-
15
10
$ I ->amOnPage ($ url );
16
11
$ I ->seeResponseCodeIs (200 );
17
12
$ I ->seeCurrentUrlEquals ($ url );
You can’t perform that action at this time.
0 commit comments