File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php 
2+ 
3+ namespace  PrivatePackagist \ApiClient \Api ;
4+ 
5+ class  Synchronizations extends  AbstractApi
6+ {
7+     public  function  all ()
8+     {
9+         return  $ this get ('/synchronizations/ ' );
10+     }
11+ }
Original file line number Diff line number Diff line change 1+ <?php  declare (strict_types=1 );
2+ 
3+ namespace  PrivatePackagist \ApiClient \Api ;
4+ 
5+ use  PHPUnit \Framework \MockObject \MockObject ;
6+ 
7+ class  SynchronizationsTest extends  ApiTestCase
8+ {
9+     public  function  testAll ()
10+     {
11+         $ expected
12+             [
13+                 "id "  => 42 ,
14+                 "name "  => "Acme Organization " ,
15+                 "isPrimary "  => true ,
16+                 "integration "  => [
17+                     "name "  => "GitHub " ,
18+                     "target "  => "github " ,
19+                     "url "  => "https://github.com " 
20+                 ],
21+                 "credentials "  => 432 ,
22+             ]
23+         ];
24+ 
25+         /** @var Teams&MockObject $api */ 
26+         $ api$ this getApiMock ();
27+         $ apiexpects ($ this once ())
28+             ->method ('get ' )
29+             ->with ($ this equalTo ('/synchronizations/ ' ))
30+             ->willReturn ($ expected
31+ 
32+         $ this assertSame ($ expected$ apiall ());
33+     }
34+ 
35+     /** 
36+      * @return string 
37+      */ 
38+     protected  function  getApiClass ()
39+     {
40+         return  Synchronizations::class;
41+     }
42+ }
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments