@@ -343,14 +343,14 @@ public function testRegisterAccessControlWithSpecifiedAttributes()
343
343
$ call = $ accessMap ->getMethodCalls ()[0 ];
344
344
$ this ->assertSame ('add ' , $ call [0 ]);
345
345
$ args = $ call [1 ];
346
- $ requestMatcherId = (string ) $ args [0 ];
347
346
348
- $ requestMatcherDefinition = $ container ->getDefinition ($ requestMatcherId );
349
- $ requestMatcherConstructorArguments = $ requestMatcherDefinition ->getArguments ();
350
- $ this ->assertArrayHasKey (4 , $ requestMatcherConstructorArguments );
351
- $ attributes = $ requestMatcherConstructorArguments [4 ];
352
- $ this ->assertArrayHasKey ('_route ' , $ attributes );
353
- $ this ->assertSame ('foo_route ' , $ attributes ['_route ' ]);
347
+ $ chainRequestMatcherDefinition = $ container ->getDefinition ((string ) $ args [0 ]);
348
+ $ chainRequestMatcherConstructorArguments = $ chainRequestMatcherDefinition ->getArguments ();
349
+ $ attributesRequestMatcher = $ container ->getDefinition ((string ) $ chainRequestMatcherConstructorArguments [0 ][0 ]);
350
+
351
+ $ this ->assertCount (1 , $ attributesRequestMatcher ->getArguments ());
352
+ $ this ->assertArrayHasKey ('_route ' , $ attributesRequestMatcher ->getArgument (0 ));
353
+ $ this ->assertSame ('foo_route ' , $ attributesRequestMatcher ->getArgument (0 )['_route ' ]);
354
354
}
355
355
356
356
public function testRegisterAccessControlWithSpecifiedRoute ()
@@ -379,14 +379,14 @@ public function testRegisterAccessControlWithSpecifiedRoute()
379
379
$ call = $ accessMap ->getMethodCalls ()[0 ];
380
380
$ this ->assertSame ('add ' , $ call [0 ]);
381
381
$ args = $ call [1 ];
382
- $ requestMatcherId = ( string ) $ args [ 0 ];
383
-
384
- $ requestMatcherDefinition = $ container -> getDefinition ( $ requestMatcherId );
385
- $ requestMatcherConstructorArguments = $ requestMatcherDefinition -> getArguments ( );
386
- $ this -> assertArrayHasKey ( 4 , $ requestMatcherConstructorArguments );
387
- $ attributes = $ requestMatcherConstructorArguments [ 4 ] ;
388
- $ this ->assertArrayHasKey ('_route ' , $ attributes );
389
- $ this ->assertSame ('foo_route ' , $ attributes ['_route ' ]);
382
+
383
+ $ chainRequestMatcherDefinition = $ container -> getDefinition (( string ) $ args [ 0 ]);
384
+ $ chainRequestMatcherConstructorArguments = $ chainRequestMatcherDefinition -> getArguments ( );
385
+ $ attributesRequestMatcher = $ container -> getDefinition (( string ) $ chainRequestMatcherConstructorArguments [ 0 ][ 0 ] );
386
+
387
+ $ this -> assertCount ( 1 , $ attributesRequestMatcher -> getArguments ()) ;
388
+ $ this ->assertArrayHasKey ('_route ' , $ attributesRequestMatcher -> getArgument ( 0 ) );
389
+ $ this ->assertSame ('foo_route ' , $ attributesRequestMatcher -> getArgument ( 0 ) ['_route ' ]);
390
390
}
391
391
392
392
public function testRegisterAccessControlWithSpecifiedAttributesThrowsException ()
0 commit comments