Skip to content

Commit 78603d4

Browse files
committed
Fix symfony 3.3
1 parent dbb9ebd commit 78603d4

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

tests/Frameworks/Symfony/Version_3_3/src/AppBundle/Controller/CommonScenariosController.php

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

3434
/**
35-
* @Route("/dynamic_route/{param01}/{param02?}", name="dynamic route with optionals")
35+
* @Route("/static_route/{param01}/{param02}", name="static route with multiple params")
3636
*/
37-
public function dynamicWithOptionalsAction($param01, $param02)
37+
public function staticWithMultipleParamsAction($param01, $param02)
3838
{
3939
return new Response(
4040
'Hi!'

tests/Integrations/Symfony/V3_3/PathParamsTest.php

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,30 +37,19 @@ public static function ddTearDownAfterClass()
3737
parent::ddTearDownAfterClass();
3838
}
3939

40-
public function testDynamicRouteWithOptionalsFilled()
40+
//Symfony 3.3 route does not have optionals
41+
public function testRouteWithAFewParameters()
4142
{
4243
$param01 = 'first_param';
4344
$param02 = 'second_param';
44-
$this->call(GetSpec::create('dynamic', "/dynamic_route/$param01/$param02"));
45+
$this->call(GetSpec::create('static', "/static_route/$param01/$param02"));
4546
$events = AppsecStatus::getInstance()->getEvents();
4647
$this->assertEquals(1, count($events));
4748
$this->assertEquals($param01, $events[0]['param01']);
4849
$this->assertEquals($param02, $events[0]['param02']);
4950
$this->assertEquals('push_params', $events[0]['eventName']);
5051
}
5152

52-
public function testDynamicRouteWithOptionalsNotFilled()
53-
{
54-
$param01 = 'first_param';
55-
$this->call(GetSpec::create('dynamic', "/dynamic_route/$param01"));
56-
$events = AppsecStatus::getInstance()->getEvents();
57-
$this->assertEquals(1, count($events));
58-
$this->assertEquals($param01, $events[0]['param01']);
59-
$this->assertEmpty($events[0]['param02']);
60-
$this->assertEquals('push_params', $events[0]['eventName']);
61-
}
62-
63-
6453
public function testStaticRoute()
6554
{
6655
$this->call(GetSpec::create('static', "/simple"));

0 commit comments

Comments
 (0)