GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

YamlTest::testDeploy()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 34
Code Lines 27

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 27
nc 2
nop 0
dl 0
loc 34
c 0
b 0
f 0
cc 2
rs 9.488
1
<?php
2
/* (c) Anton Medvedev <[email protected]>
3
 *
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 */
7
8
namespace Deployer;
9
10
use Symfony\Component\Console\Output\Output;
11
12
class YamlTest extends AbstractTest
0 ignored issues
show
Deprecated Code introduced by
The class Deployer\AbstractTest has been deprecated: Use JoyTest instead. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

12
class YamlTest extends /** @scrutinizer ignore-deprecated */ AbstractTest
Loading history...
13
{
14
    public const RECIPE = __DIR__ . '/recipe/deploy.yaml';
15
16
    public function testDeploy()
17
    {
18
        $this->init(self::RECIPE);
19
        $this->deployer->config->set('repository', __REPOSITORY__);
20
        $this->tester->run([
21
            'deploy',
22
            'selector' => 'all',
23
            '-f' => self::RECIPE,
24
        ], [
25
            'verbosity' => Output::VERBOSITY_VERBOSE,
26
            'interactive' => false,
27
        ]);
28
29
        $display = $this->tester->getDisplay();
30
        self::assertEquals(0, $this->tester->getStatusCode(), $display);
31
32
        foreach ($this->deployer->hosts as $host) {
33
            $deployPath = $host->get('deploy_path');
34
35
            self::assertDirectoryExists($deployPath . '/.dep');
36
            self::assertDirectoryExists($deployPath . '/releases');
37
            self::assertDirectoryExists($deployPath . '/shared');
38
            self::assertDirectoryExists($deployPath . '/current');
39
            self::assertDirectoryExists($deployPath . '/current/');
40
            self::assertFileExists($deployPath . '/current/README.md');
41
            self::assertDirectoryExists($deployPath . '/current/storage/logs');
42
            self::assertDirectoryExists($deployPath . '/current/storage/db');
43
            self::assertDirectoryExists($deployPath . '/shared/storage/logs');
44
            self::assertDirectoryExists($deployPath . '/shared/storage/db');
45
            self::assertFileExists($deployPath . '/shared/uploads/poem.txt');
46
            self::assertFileExists($deployPath . '/shared/.env');
47
            self::assertFileExists($deployPath . '/current/config/test.yaml');
48
            self::assertFileExists($deployPath . '/shared/config/test.yaml');
49
            self::assertEquals(1, intval(`cd $deployPath && ls -1 releases | wc -l`));
50
        }
51
    }
52
}
53