Mock Rclone installation
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				ci/woodpecker/push/woodpecker Pipeline was successful
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	ci/woodpecker/push/woodpecker Pipeline was successful
				
			This commit is contained in:
		@@ -3,16 +3,21 @@ use PHPUnit\Framework\TestCase;
 | 
			
		||||
 | 
			
		||||
final class RcloneTest extends TestCase
 | 
			
		||||
{
 | 
			
		||||
    public function testExceptionOnInvalidRclonePath(): void
 | 
			
		||||
    public function testRclonePath(): void
 | 
			
		||||
    {
 | 
			
		||||
        $this->expectException(\Exception::class);
 | 
			
		||||
        $rclone = new \App\Rclone\Rclone('invalid');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    public function testRcloneVersion(): void
 | 
			
		||||
    public function testRcloneInvalidVersion(): void
 | 
			
		||||
    {
 | 
			
		||||
        $rclone = new \App\Rclone\Rclone();
 | 
			
		||||
        $this->assertStringContainsString('rclone', $rclone->getversion());
 | 
			
		||||
        $this->expectException(\Exception::class);
 | 
			
		||||
        $rclone = new \App\Rclone\Rclone('uname');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function testRcloneValidVersion(): void
 | 
			
		||||
    {
 | 
			
		||||
        $rclone = new \App\Rclone\Rclone('./tests/mock-rclone');
 | 
			
		||||
        $this->assertStringContainsString('rclone', $rclone->getVersion());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										2
									
								
								tests/mock-rclone
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										2
									
								
								tests/mock-rclone
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
echo rclone v1.53.3-DEV
 | 
			
		||||
		Reference in New Issue
	
	Block a user