File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -1298,6 +1298,35 @@ public function shouldRemoveForkRelation()
12981298        $ this  ->assertEquals ($ expectedBool , $ api ->removeForkRelation (2 ));
12991299    }
13001300
1301+ 
1302+     /** 
1303+      * @test 
1304+      */ 
1305+     public  function  shouldGetForks ()
1306+     {
1307+         $ expectedArray  = [
1308+             [
1309+                 'id '  => 2 ,
1310+                 'forked_from_project '  => [
1311+                     'id '  => 1 
1312+                 ]
1313+             ],
1314+             [
1315+                 'id '  => 3 ,
1316+                 'forked_from_project '  => [
1317+                     'id '  => 1 
1318+                 ]
1319+             ],
1320+         ];
1321+         $ api  = $ this  ->getApiMock ();
1322+         $ api ->expects ($ this  ->once ())
1323+             ->method ('get ' )
1324+             ->with ('projects/1/forks ' )
1325+             ->will ($ this  ->returnValue ($ expectedArray ));
1326+ 
1327+         $ this  ->assertEquals ($ expectedArray , $ api ->forks (1 ));
1328+     }
1329+ 
13011330    /** 
13021331     * @test 
13031332     */ 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments