@@ -72,10 +72,7 @@ public function testThatSecurityVotersAreProcessedInPriorityOrder()
7272 $ this ->assertCount (4 , $ refs );
7373 }
7474
75- /**
76- * Test that in debug mode, voters are correctly decorated.
77- */
78- public function testThatVotersAreDecoratedInDebugMode (): void
75+ public function testThatVotersAreTraceableInDebugMode (): void
7976 {
8077 $ container = new ContainerBuilder ();
8178
@@ -96,21 +93,18 @@ public function testThatVotersAreDecoratedInDebugMode(): void
9693 $ compilerPass ->process ($ container );
9794
9895 $ def1 = $ container ->getDefinition ('debug.security.voter.voter1 ' );
99- $ this ->assertEquals ( array ( ' voter1 ' , null , 0 ), $ def1 ->getDecoratedService (), 'voter1: wrong return from getDecoratedService ' );
100- $ this ->assertEquals (new Reference ('debug.security.voter. voter1.inner ' ), $ def1 ->getArgument (0 ), 'voter1: wrong decorator argument ' );
96+ $ this ->assertNull ( $ def1 ->getDecoratedService (), 'voter1: should not be decorated ' );
97+ $ this ->assertEquals (new Reference ('voter1 ' ), $ def1 ->getArgument (0 ), 'voter1: wrong argument ' );
10198
10299 $ def2 = $ container ->getDefinition ('debug.security.voter.voter2 ' );
103- $ this ->assertEquals ( array ( ' voter2 ' , null , 0 ), $ def2 ->getDecoratedService (), 'voter2: wrong return from getDecoratedService ' );
104- $ this ->assertEquals (new Reference ('debug.security.voter. voter2.inner ' ), $ def2 ->getArgument (0 ), 'voter2: wrong decorator argument ' );
100+ $ this ->assertNull ( $ def2 ->getDecoratedService (), 'voter2: should not be decorated ' );
101+ $ this ->assertEquals (new Reference ('voter2 ' ), $ def2 ->getArgument (0 ), 'voter2: wrong argument ' );
105102
106103 $ voters = $ container ->findTaggedServiceIds ('security.voter ' );
107104 $ this ->assertCount (2 , $ voters , 'Incorrect count of voters ' );
108105 }
109106
110- /**
111- * Test that voters are not decorated if the application is not in debug mode.
112- */
113- public function testThatVotersAreNotDecoratedWithoutDebugMode (): void
107+ public function testThatVotersAreNotTraceableWithoutDebugMode (): void
114108 {
115109 $ container = new ContainerBuilder ();
116110 $ container ->setParameter ('kernel.debug ' , false );
@@ -130,8 +124,8 @@ public function testThatVotersAreNotDecoratedWithoutDebugMode(): void
130124 $ compilerPass = new AddSecurityVotersPass ();
131125 $ compilerPass ->process ($ container );
132126
133- $ this ->assertFalse ($ container ->has ('debug.security.voter.voter1 ' ), 'voter1 should not be decorated ' );
134- $ this ->assertFalse ($ container ->has ('debug.security.voter.voter2 ' ), 'voter2 should not be decorated ' );
127+ $ this ->assertFalse ($ container ->has ('debug.security.voter.voter1 ' ), 'voter1 should not be traced ' );
128+ $ this ->assertFalse ($ container ->has ('debug.security.voter.voter2 ' ), 'voter2 should not be traced ' );
135129 }
136130
137131 /**
0 commit comments