Skip to content

Commit 68d9747

Browse files
committed
Create new endpoint fixture to test if view response listener is called before template as it should
1 parent 5b4e442 commit 68d9747

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

Tests/Functional/Bundle/TestBundle/Controller/ArticleController.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,26 @@ public function cpostAction(Request $request)
3232
}
3333

3434
/**
35-
* @Get("/articles.{_format}", name="get_article", defaults={"_format": "html"})
35+
* @Get("/articles.{_format}", name="get_articles", defaults={"_format": "html"})
3636
*
3737
* @View()
3838
*/
39-
#[Get(path: '/articles.{_format}', name: 'get_article', defaults: ['_format' => 'html'])]
39+
#[Get(path: '/articles.{_format}', name: 'get_articles', defaults: ['_format' => 'html'])]
4040
#[View]
4141
public function cgetAction()
4242
{
4343
return $this->view();
4444
}
45+
46+
/**
47+
* @Get("/articles/{id}.{_format}", name="get_article", defaults={"_format": "html"})
48+
*
49+
* @View()
50+
*/
51+
#[Get(path: '/articles/{id}.{_format}', name: 'get_article', defaults: ['_format' => 'html'])]
52+
#[View]
53+
public function cgetSingleAction(int $id)
54+
{
55+
return ['id' => $id];
56+
}
4557
}

0 commit comments

Comments
 (0)