This commit is contained in:
		
							
								
								
									
										24
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
			
		||||
{
 | 
			
		||||
    // Use IntelliSense to learn about possible attributes.
 | 
			
		||||
    // Hover to view descriptions of existing attributes.
 | 
			
		||||
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
 | 
			
		||||
    "version": "0.2.0",
 | 
			
		||||
    "configurations": [
 | 
			
		||||
        {
 | 
			
		||||
            "name": "Launch currently open script",
 | 
			
		||||
            "type": "php",
 | 
			
		||||
            "request": "launch",
 | 
			
		||||
            "program": "${file}",
 | 
			
		||||
            "cwd": "${fileDirname}",
 | 
			
		||||
            "args": ["backup", "config.example.yml"],
 | 
			
		||||
            "port": 0,
 | 
			
		||||
            "runtimeArgs": [
 | 
			
		||||
                "-dxdebug.start_with_request=yes"
 | 
			
		||||
            ],
 | 
			
		||||
            "env": {
 | 
			
		||||
                "XDEBUG_MODE": "debug,develop",
 | 
			
		||||
                "XDEBUG_CONFIG": "client_port=${port}"
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    ]
 | 
			
		||||
}
 | 
			
		||||
@@ -2,8 +2,13 @@ pipeline:
 | 
			
		||||
  requirements:
 | 
			
		||||
    image: composer
 | 
			
		||||
    commands:
 | 
			
		||||
    - composer install
 | 
			
		||||
  deploy:
 | 
			
		||||
    - composer install --no-dev
 | 
			
		||||
  run:
 | 
			
		||||
    image: php
 | 
			
		||||
    commands:
 | 
			
		||||
      - ./backup show config.example.yml
 | 
			
		||||
  test:
 | 
			
		||||
    image: composer
 | 
			
		||||
    commands:
 | 
			
		||||
    - composer install
 | 
			
		||||
    - ./vendor/bin/phpunit tests
 | 
			
		||||
@@ -19,6 +19,7 @@
 | 
			
		||||
        "squizlabs/php_codesniffer": "*",
 | 
			
		||||
        "phpstan/phpstan": "^1.10",
 | 
			
		||||
        "vimeo/psalm": "^5.12",
 | 
			
		||||
        "phpmd/phpmd": "^2.13"
 | 
			
		||||
        "phpmd/phpmd": "^2.13",
 | 
			
		||||
        "phpunit/phpunit": "^9.6"
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1611
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1611
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										18
									
								
								tests/Rclone/RcloneTest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								tests/Rclone/RcloneTest.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
<?php declare(strict_types=1);
 | 
			
		||||
use PHPUnit\Framework\TestCase;
 | 
			
		||||
 | 
			
		||||
final class RcloneTest extends TestCase
 | 
			
		||||
{
 | 
			
		||||
    public function testExceptionOnInvalidRclonePath(): void
 | 
			
		||||
    {
 | 
			
		||||
        $this->expectException(\Exception::class);
 | 
			
		||||
        $rclone = new \App\Rclone\Rclone('invalid');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    public function testRcloneVersion(): void
 | 
			
		||||
    {
 | 
			
		||||
        $rclone = new \App\Rclone\Rclone();
 | 
			
		||||
        $this->assertStringContainsString('rclone', $rclone->getversion());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user