404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.116.87.225: ~ $
<?php

it('outputs checkstyle format', function () {
    [$statusCode, $output] = run('default', [
        'path' => base_path('tests/Fixtures/with-fixable-issues'),
        '--preset' => 'psr12',
        '--format' => 'checkstyle',
    ]);

    expect($statusCode)->toBe(1)
        ->and($output)
        ->toContain('<?xml version="1.0" encoding="UTF-8"?>')
        ->toContain('<checkstyle>')
        ->toContain('</checkstyle>')
        ->not->toContain(sprintf('⨯ %s', implode(DIRECTORY_SEPARATOR, [
            'tests', 'Fixtures', 'with-fixable-issues', 'file.php',
        ])));
});

it('outputs json format', function () {
    [$statusCode, $output] = run('default', [
        'path' => base_path('tests/Fixtures/with-fixable-issues'),
        '--preset' => 'psr12',
        '--format' => 'json',
    ]);

    expect($statusCode)->toBe(1)
        ->and($output)
        ->toBeJson()
        ->toContain('appliedFixers')
        ->not->toContain(sprintf('⨯ %s', implode(DIRECTORY_SEPARATOR, [
            'tests', 'Fixtures', 'with-fixable-issues', 'file.php',
        ])));
});

it('outputs xml format', function () {
    [$statusCode, $output] = run('default', [
        'path' => base_path('tests/Fixtures/with-fixable-issues'),
        '--preset' => 'psr12',
        '--format' => 'xml',
    ]);

    expect($statusCode)->toBe(1)
        ->and($output)
        ->toContain('<?xml version="1.0" encoding="UTF-8"?>')
        ->not->toContain(sprintf('⨯ %s', implode(DIRECTORY_SEPARATOR, [
            'tests', 'Fixtures', 'with-fixable-issues', 'file.php',
        ])));
});

it('outputs junit format', function () {
    [$statusCode, $output] = run('default', [
        'path' => base_path('tests/Fixtures/with-fixable-issues'),
        '--preset' => 'psr12',
        '--format' => 'junit',
    ]);

    expect($statusCode)->toBe(1)
        ->and($output)
        ->toContain('<?xml version="1.0" encoding="UTF-8"?>')
        ->toContain('CDATA')
        ->not->toContain(sprintf('⨯ %s', implode(DIRECTORY_SEPARATOR, [
            'tests', 'Fixtures', 'with-fixable-issues', 'file.php',
        ])));
});

it('outputs gitlab format', function () {
    [$statusCode, $output] = run('default', [
        'path' => base_path('tests/Fixtures/with-fixable-issues'),
        '--preset' => 'psr12',
        '--format' => 'gitlab',
    ]);

    expect($statusCode)->toBe(1)
        ->and($output)
        ->toBeJson()
        ->toContain('fingerprint')
        ->not->toContain(sprintf('⨯ %s', implode(DIRECTORY_SEPARATOR, [
            'tests', 'Fixtures', 'with-fixable-issues', 'file.php',
        ])));
});

Filemanager

Name Type Size Permission Actions
Fixers Folder 0755
ConfigurationTest.php File 315 B 0644
DirtyTest.php File 1.54 KB 0644
FormatTest.php File 2.64 KB 0644
PresetTest.php File 1.18 KB 0644
ProgressTest.php File 957 B 0644
SummaryTest.php File 1.25 KB 0644
VerboseTest.php File 364 B 0644