Skip to content

Commit

Permalink
Fix: Rename directory
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Jan 13, 2023
1 parent c13b588 commit 8821fa1
Show file tree
Hide file tree
Showing 25 changed files with 36 additions and 36 deletions.
64 changes: 32 additions & 32 deletions tests/Console/LintCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected function setUp(): void
public function testExecute(): void
{
$this->commandTester->execute([
'paths' => ['tests/data/exclusion/good'],
'paths' => ['tests/Fixture/exclusion/good'],
]);

$output = $this->commandTester->getDisplay();
Expand All @@ -40,20 +40,20 @@ public function testExecute(): void
public function testMultipleBasePaths(): void
{
$this->commandTester->execute([
'paths' => ['tests/data/basepaths/a', 'tests/data/basepaths/b'],
'paths' => ['tests/Fixture/basepaths/a', 'tests/Fixture/basepaths/b'],
]);

$output = $this->commandTester->getDisplay();
$statusCode = $this->commandTester->getStatusCode();
$this->assertSame($statusCode, 1);
$this->assertStringStartsWith('tests/data/basepaths/a/bad.html.twig', $output);
$this->assertStringContainsString("\ntests/data/basepaths/b/bad.html.twig", $output);
$this->assertStringStartsWith('tests/Fixture/basepaths/a/bad.html.twig', $output);
$this->assertStringContainsString("\ntests/Fixture/basepaths/b/bad.html.twig", $output);
}

public function testExecuteWithError(): void
{
$this->commandTester->execute([
'paths' => ['tests/data/exclusion'],
'paths' => ['tests/Fixture/exclusion'],
]);

$output = $this->commandTester->getDisplay();
Expand All @@ -66,7 +66,7 @@ public function testExecuteWithIgnoredErrors(): void
{
$this->commandTester->execute([
'--severity' => 'ignore',
'paths' => ['tests/data/exclusion'],
'paths' => ['tests/Fixture/exclusion'],
]);

$output = $this->commandTester->getDisplay();
Expand All @@ -79,7 +79,7 @@ public function testExecuteWithIgnoredWarnings(): void
{
$this->commandTester->execute([
'--severity' => 'error',
'paths' => ['tests/data/exclusion/bad/warning.html.twig'],
'paths' => ['tests/Fixture/exclusion/bad/warning.html.twig'],
]);

$output = $this->commandTester->getDisplay();
Expand All @@ -89,7 +89,7 @@ public function testExecuteWithIgnoredWarnings(): void

$this->commandTester->execute([
'--severity' => 'error',
'paths' => ['tests/data/exclusion/bad'],
'paths' => ['tests/Fixture/exclusion/bad'],
]);

$output = $this->commandTester->getDisplay();
Expand All @@ -101,7 +101,7 @@ public function testExecuteWithIgnoredWarnings(): void
public function testExecuteWithExclude(): void
{
$this->commandTester->execute([
'paths' => ['tests/data/exclusion'],
'paths' => ['tests/Fixture/exclusion'],
'--exclude' => ['bad'],
]);

Expand All @@ -114,7 +114,7 @@ public function testExecuteWithExclude(): void
public function testErrorsOnlyDisplayBlocking(): void
{
$this->commandTester->execute([
'paths' => ['tests/data/exclusion/bad/mixed.html.twig'],
'paths' => ['tests/Fixture/exclusion/bad/mixed.html.twig'],
'--severity' => 'error',
'--display' => ConfigInterface::DISPLAY_BLOCKING,
]);
Expand All @@ -131,7 +131,7 @@ public function testErrorsOnlyDisplayBlocking(): void
public function testErrorsDisplayAll(): void
{
$this->commandTester->execute([
'paths' => ['tests/data/exclusion/bad/mixed.html.twig'],
'paths' => ['tests/Fixture/exclusion/bad/mixed.html.twig'],
'--severity' => 'error',
'--display' => ConfigInterface::DISPLAY_ALL,
]);
Expand All @@ -149,7 +149,7 @@ public function testSyntaxErrorThrow(): void
{
$this->expectException(SyntaxError::class);
$this->commandTester->execute([
'paths' => ['tests/data/syntax_error/syntax_errors.html.twig'],
'paths' => ['tests/Fixture/syntax_error/syntax_errors.html.twig'],
'--severity' => 'error',
'--display' => ConfigInterface::DISPLAY_ALL,
'--throw-syntax-error' => true,
Expand All @@ -162,7 +162,7 @@ public function testSyntaxErrorThrow(): void
public function testSyntaxErrorNotThrow(): void
{
$this->commandTester->execute([
'paths' => ['tests/data/syntax_error/syntax_errors.html.twig'],
'paths' => ['tests/Fixture/syntax_error/syntax_errors.html.twig'],
'--severity' => 'error',
'--display' => ConfigInterface::DISPLAY_ALL,
'--throw-syntax-error' => false,
Expand All @@ -178,7 +178,7 @@ public function testSyntaxErrorNotThrow(): void
public function testSyntaxErrorNotThrowOmitArgument(): void
{
$this->commandTester->execute([
'paths' => ['tests/data/syntax_error/syntax_errors.html.twig'],
'paths' => ['tests/Fixture/syntax_error/syntax_errors.html.twig'],
'--severity' => 'error',
'--display' => ConfigInterface::DISPLAY_ALL,
]);
Expand All @@ -194,55 +194,55 @@ public function testConfigFileWithoutCliPath(): void
{
$this->commandTester->execute([
'paths' => null,
'--config' => 'tests/data/config/external/.twig_cs.dist.php',
'--config' => 'tests/Fixture/config/external/.twig_cs.dist.php',
]);

$output = $this->commandTester->getDisplay();
$statusCode = $this->commandTester->getStatusCode();
$this->assertSame($statusCode, 1);
$this->assertStringContainsString('tests/data/basepaths/a/bad.html.twig
$this->assertStringContainsString('tests/Fixture/basepaths/a/bad.html.twig
l.1 c.8 : WARNING Unused variable "foo".
tests/data/basepaths/b/bad.html.twig
tests/Fixture/basepaths/b/bad.html.twig
l.1 c.8 : WARNING Unused variable "foo".
2 violation(s) found', $output);
}

public function testConfigFileWithCliPath(): void
{
$this->commandTester->execute([
'paths' => ['tests/data/syntax_error'],
'--config' => 'tests/data/config/external/.twig_cs.dist.php',
'paths' => ['tests/Fixture/syntax_error'],
'--config' => 'tests/Fixture/config/external/.twig_cs.dist.php',
]);

$output = $this->commandTester->getDisplay();
$statusCode = $this->commandTester->getStatusCode();
$this->assertSame($statusCode, 1);
$this->assertStringContainsString('tests/data/basepaths/a/bad.html.twig
$this->assertStringContainsString('tests/Fixture/basepaths/a/bad.html.twig
l.1 c.8 : WARNING Unused variable "foo".
tests/data/basepaths/b/bad.html.twig
tests/Fixture/basepaths/b/bad.html.twig
l.1 c.8 : WARNING Unused variable "foo".
tests/data/syntax_error/syntax_errors.html.twig
tests/Fixture/syntax_error/syntax_errors.html.twig
l.1 c.17 : ERROR Unexpected "}".
3 violation(s) found', $output);
}

public function testConfigFileWithDisplayAndSeverity(): void
{
$this->commandTester->execute([
'--config' => 'tests/data/config/external/.twig_cs_with_display_blocking.dist.php',
'--config' => 'tests/Fixture/config/external/.twig_cs_with_display_blocking.dist.php',
]);

$output = $this->commandTester->getDisplay();
$statusCode = $this->commandTester->getStatusCode();
$this->assertSame($statusCode, 1);
$this->assertStringContainsString('tests/data/syntax_error/syntax_errors.html.twig
$this->assertStringContainsString('tests/Fixture/syntax_error/syntax_errors.html.twig
l.1 c.17 : ERROR Unexpected "}".
1 violation(s) found', $output);
}

public function testConfigFileSamePathWithRulesetOverrides(): void
{
chdir(__DIR__.'/../data/config/local');
chdir(__DIR__.'/../Fixture/config/local');
$this->commandTester->execute([
'paths' => null,
]);
Expand Down Expand Up @@ -273,23 +273,23 @@ public function testConfigFileSamePathWithRulesetOverrides(): void
public function testUnusedWithFileLoader(): void
{
$this->commandTester->execute([
'--config' => 'tests/data/config/loaders/.twig_cs.dist.php',
'--config' => 'tests/Fixture/config/loaders/.twig_cs.dist.php',
]);

$output = $this->commandTester->getDisplay();
$statusCode = $this->commandTester->getStatusCode();
$this->assertSame($statusCode, 1);
$this->assertStringContainsString('tests/data/config/loaders/src/embed/child.html.twig
$this->assertStringContainsString('tests/Fixture/config/loaders/src/embed/child.html.twig
l.3 c.7 : WARNING Unused variable "unused_child".
tests/data/config/loaders/src/embed/parent.html.twig
tests/Fixture/config/loaders/src/embed/parent.html.twig
l.2 c.7 : WARNING Unused variable "unused_parent".
tests/data/config/loaders/src/extends/child.html.twig
tests/Fixture/config/loaders/src/extends/child.html.twig
l.5 c.7 : WARNING Unused variable "unused_child".
tests/data/config/loaders/src/extends/parent.html.twig
tests/Fixture/config/loaders/src/extends/parent.html.twig
l.7 c.7 : WARNING Unused variable "unused_parent".
tests/data/config/loaders/src/include/child.html.twig
tests/Fixture/config/loaders/src/include/child.html.twig
l.3 c.7 : WARNING Unused variable "unused_child".
tests/data/config/loaders/src/include/parent.html.twig
tests/Fixture/config/loaders/src/include/parent.html.twig
l.2 c.7 : WARNING Unused variable "unused_parent".
6 violation(s) found', $output);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/CorpusTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected function setUp(): void
public function testExecute(): void
{
$this->commandTester->execute([
'paths' => ['tests/data/valid_corpus'],
'paths' => ['tests/Fixture/valid_corpus'],
]);

$output = $this->commandTester->getDisplay();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ return Twigcs\Config\Config::create()
->setReporter('json')
->setName('my-config')
->setSpecificRuleSets([
'*/a.html.twig' => Twigcs\Tests\data\config\local\CustomRuleset::class,
'*/a.html.twig' => Twigcs\Tests\Fixture\config\local\CustomRuleset::class,
])
;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace FriendsOfTwig\Twigcs\Tests\data\config\local;
namespace FriendsOfTwig\Twigcs\Tests\Fixture\config\local;

use FriendsOfTwig\Twigcs\RegEngine\RulesetBuilder;
use FriendsOfTwig\Twigcs\RegEngine\RulesetConfigurator;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

{%- block collection_widget -%}
{% if prototype is defined and not prototype.rendered %}
{%- set attr = attr|merge({'data-prototype': form_row(prototype)}) -%}
{%- set attr = attr|merge({'Fixture-prototype': form_row(prototype)}) -%}
{% endif %}
{{- block('form_widget') -}}
{%- endblock collection_widget -%}
Expand Down

0 comments on commit 8821fa1

Please sign in to comment.