File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php 
2+ 
3+ /* 
4+  * This file is part of the Symfony package. 
5+  * 
6+  * (c) Fabien Potencier <fabien@symfony.com> 
7+  * 
8+  * For the full copyright and license information, please view the LICENSE 
9+  * file that was distributed with this source code. 
10+  */ 
11+ 
12+ namespace  Symfony \Component \Routing \Exception ;
13+ 
14+ class  LogicException extends  \LogicException
15+ {
16+ }
Original file line number Diff line number Diff line change 1515use  Symfony \Component \Config \Loader \LoaderResolverInterface ;
1616use  Symfony \Component \Config \Resource \FileResource ;
1717use  Symfony \Component \Routing \Attribute \Route  as  RouteAnnotation ;
18+ use  Symfony \Component \Routing \Exception \LogicException ;
1819use  Symfony \Component \Routing \Route ;
1920use  Symfony \Component \Routing \RouteCollection ;
2021
@@ -226,6 +227,7 @@ public function setResolver(LoaderResolverInterface $resolver): void
226227
227228    public  function  getResolver (): LoaderResolverInterface 
228229    {
230+         throw  new  LogicException (sprintf ('The "%s()" method must not be called. ' , __METHOD__ ));
229231    }
230232
231233    /** 
Original file line number Diff line number Diff line change 1313
1414use  PHPUnit \Framework \TestCase ;
1515use  Symfony \Component \Routing \Alias ;
16+ use  Symfony \Component \Routing \Exception \LogicException ;
1617use  Symfony \Component \Routing \Tests \Fixtures \AttributeFixtures \AbstractClassController ;
1718use  Symfony \Component \Routing \Tests \Fixtures \AttributeFixtures \ActionPathController ;
1819use  Symfony \Component \Routing \Tests \Fixtures \AttributeFixtures \BazClass ;
@@ -54,6 +55,14 @@ protected function setUp(?string $env = null): void
5455        $ this  ->loader  = new  TraceableAttributeClassLoader ($ env );
5556    }
5657
58+     public  function  testGetResolver ()
59+     {
60+         $ this  ->expectException (LogicException::class);
61+ 
62+         $ loader  = new  TraceableAttributeClassLoader ();
63+         $ loader ->getResolver ();
64+     }
65+ 
5766    /** 
5867     * @dataProvider provideTestSupportsChecksResource 
5968     */ 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments