File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 2424use  OCA \FilesAccessControl \StorageWrapper ;
2525use  OCP \Files \ForbiddenException ;
2626use  Test \TestCase ;
27+ use  OCP \Files \Storage \IStorage ;
28+ use  OCA \FilesAccessControl \Operation ;
2729
2830class  StorageWrapperTest extends  TestCase {
2931
@@ -36,16 +38,13 @@ class StorageWrapperTest extends TestCase {
3638	protected  function  setUp (): void  {
3739		parent ::setUp ();
3840
39- 		$ this storage  = $ this getMockBuilder ('OCP\Files\Storage\IStorage ' )
40- 			->getMock ();
41+ 		$ this storage  = $ this createMock (IStorage::class);
4142
42- 		$ this operation  = $ this getMockBuilder ('OCA\FilesAccessControl\Operation ' )
43- 			->disableOriginalConstructor ()
44- 			->getMock ();
43+ 		$ this operation  = $ this createMock (Operation::class);
4544	}
4645
4746	protected  function  getInstance (array  $ methods
48- 		return  $ this getMockBuilder (' OCA\FilesAccessControl\ StorageWrapper' 
47+ 		return  $ this getMockBuilder (StorageWrapper::class )
4948			->setConstructorArgs ([
5049				[
5150					'storage '  => $ this storage ,
Original file line number Diff line number Diff line change 11<?xml  version =" 1.0"  encoding =" utf-8" 
22<phpunit  bootstrap =" bootstrap.php" 
3- 		 strict =" true" 
43		 verbose =" true" 
54		 timeoutForSmallTests =" 900" 
65		 timeoutForMediumTests =" 900" 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments