Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Move fixtures #479

Merged
merged 1 commit into from
Dec 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Ergebnis\Classy\Test\Fixture\Classy\WithMethodsNamedAfterKeywords;
namespace Ergebnis\Classy\Test\Fixture\Classy\Php72\WithMethodsNamedAfterKeywords;

class Foo
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Ergebnis\Classy\Test\Fixture\Classy\WithMethodsNamedAfterKeywordsAndReturnType;
namespace Ergebnis\Classy\Test\Fixture\Classy\Php72\WithMethodsNamedAfterKeywordsAndReturnType;


class Foo
Expand Down
19 changes: 19 additions & 0 deletions test/Fixture/Classy/Php72/WithinMultipleNamespaces/source.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace Ergebnis\Classy\Test\Fixture\Classy\Php72\WithinMultipleNamespaces\Foo;
{
class Foo {}

interface Bar {}

trait Baz {}
}

namespace Ergebnis\Classy\Test\Fixture\Classy\Php72\WithinMultipleNamespaces\Bar;
{
class Foo {}

interface Bar {}

trait Baz {}
}
9 changes: 9 additions & 0 deletions test/Fixture/Classy/Php72/WithinNamespace/source.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

namespace Ergebnis\Classy\Test\Fixture\Classy\Php72\WithinNamespace;

class Foo {}

interface Bar {}

trait Baz {}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Ergebnis\Classy\Test\Fixture\Classy\WithinNamespaceAndMultiLineComments;
namespace Ergebnis\Classy\Test\Fixture\Classy\Php72\WithinNamespaceAndMultiLineComments;

/* foo */ class /* bar */ Foo /* baz */ {}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Ergebnis\Classy\Test\Fixture\Classy\WithinNamespaceAndShellStyleComments;
namespace Ergebnis\Classy\Test\Fixture\Classy\Php72\WithinNamespaceAndShellStyleComments;

class # foo
Foo # bar
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Ergebnis\Classy\Test\Fixture\Classy\WithinNamespaceAndSingleLineComments;
namespace Ergebnis\Classy\Test\Fixture\Classy\Php72\WithinNamespaceAndSingleLineComments;

class // foo
Foo // bar
Expand Down
10 changes: 10 additions & 0 deletions test/Fixture/Classy/Php72/WithinNamespaceWithBraces/source.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Ergebnis\Classy\Test\Fixture\Classy\Php72\WithinNamespaceWithBraces
{
class Foo {}

interface Bar {}

trait Baz {}
}
19 changes: 0 additions & 19 deletions test/Fixture/Classy/WithinMultipleNamespaces/source.php

This file was deleted.

9 changes: 0 additions & 9 deletions test/Fixture/Classy/WithinNamespace/source.php

This file was deleted.

10 changes: 0 additions & 10 deletions test/Fixture/Classy/WithinNamespaceWithBraces/source.php

This file was deleted.

72 changes: 36 additions & 36 deletions test/Unit/ConstructsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,105 +172,105 @@ public function provideScenarioWithClassyConstructs(): \Generator
Test\Util\Scenario::create(
Test\Util\PhpVersion::fromInt(70200),
'within-namespace',
__DIR__ . '/../Fixture/Classy/WithinNamespace/source.php',
Construct::fromName(Test\Fixture\Classy\WithinNamespace\Bar::class),
Construct::fromName(Test\Fixture\Classy\WithinNamespace\Baz::class),
Construct::fromName(Test\Fixture\Classy\WithinNamespace\Foo::class)
__DIR__ . '/../Fixture/Classy/Php72/WithinNamespace/source.php',
Construct::fromName(Test\Fixture\Classy\Php72\WithinNamespace\Bar::class),
Construct::fromName(Test\Fixture\Classy\Php72\WithinNamespace\Baz::class),
Construct::fromName(Test\Fixture\Classy\Php72\WithinNamespace\Foo::class)
),
Test\Util\Scenario::create(
Test\Util\PhpVersion::fromInt(70200),
'within-namespace-and-shell-style-comments',
__DIR__ . '/../Fixture/Classy/WithinNamespaceAndShellStyleComments/source.php',
Construct::fromName(Test\Fixture\Classy\WithinNamespaceAndShellStyleComments\Bar::class),
Construct::fromName(Test\Fixture\Classy\WithinNamespaceAndShellStyleComments\Baz::class),
Construct::fromName(Test\Fixture\Classy\WithinNamespaceAndShellStyleComments\Foo::class)
__DIR__ . '/../Fixture/Classy/Php72/WithinNamespaceAndShellStyleComments/source.php',
Construct::fromName(Test\Fixture\Classy\Php72\WithinNamespaceAndShellStyleComments\Bar::class),
Construct::fromName(Test\Fixture\Classy\Php72\WithinNamespaceAndShellStyleComments\Baz::class),
Construct::fromName(Test\Fixture\Classy\Php72\WithinNamespaceAndShellStyleComments\Foo::class)
),
Test\Util\Scenario::create(
Test\Util\PhpVersion::fromInt(70200),
'within-namespace-and-single-line-comments',
__DIR__ . '/../Fixture/Classy/WithinNamespaceAndSingleLineComments/source.php',
Construct::fromName(Test\Fixture\Classy\WithinNamespaceAndSingleLineComments\Bar::class),
Construct::fromName(Test\Fixture\Classy\WithinNamespaceAndSingleLineComments\Baz::class),
Construct::fromName(Test\Fixture\Classy\WithinNamespaceAndSingleLineComments\Foo::class)
__DIR__ . '/../Fixture/Classy/Php72/WithinNamespaceAndSingleLineComments/source.php',
Construct::fromName(Test\Fixture\Classy\Php72\WithinNamespaceAndSingleLineComments\Bar::class),
Construct::fromName(Test\Fixture\Classy\Php72\WithinNamespaceAndSingleLineComments\Baz::class),
Construct::fromName(Test\Fixture\Classy\Php72\WithinNamespaceAndSingleLineComments\Foo::class)
),
Test\Util\Scenario::create(
Test\Util\PhpVersion::fromInt(70200),
'within-namespace-and-multi-line-comments',
__DIR__ . '/../Fixture/Classy/WithinNamespaceAndMultiLineComments/source.php',
Construct::fromName(Test\Fixture\Classy\WithinNamespaceAndMultiLineComments\Bar::class),
Construct::fromName(Test\Fixture\Classy\WithinNamespaceAndMultiLineComments\Baz::class),
Construct::fromName(Test\Fixture\Classy\WithinNamespaceAndMultiLineComments\Foo::class)
__DIR__ . '/../Fixture/Classy/Php72/WithinNamespaceAndMultiLineComments/source.php',
Construct::fromName(Test\Fixture\Classy\Php72\WithinNamespaceAndMultiLineComments\Bar::class),
Construct::fromName(Test\Fixture\Classy\Php72\WithinNamespaceAndMultiLineComments\Baz::class),
Construct::fromName(Test\Fixture\Classy\Php72\WithinNamespaceAndMultiLineComments\Foo::class)
),
Test\Util\Scenario::create(
Test\Util\PhpVersion::fromInt(70200),
'within-namespace-with-braces',
__DIR__ . '/../Fixture/Classy/WithinNamespaceWithBraces/source.php',
Construct::fromName(Test\Fixture\Classy\WithinNamespaceWithBraces\Bar::class),
Construct::fromName(Test\Fixture\Classy\WithinNamespaceWithBraces\Baz::class),
Construct::fromName(Test\Fixture\Classy\WithinNamespaceWithBraces\Foo::class)
__DIR__ . '/../Fixture/Classy/Php72/WithinNamespaceWithBraces/source.php',
Construct::fromName(Test\Fixture\Classy\Php72\WithinNamespaceWithBraces\Bar::class),
Construct::fromName(Test\Fixture\Classy\Php72\WithinNamespaceWithBraces\Baz::class),
Construct::fromName(Test\Fixture\Classy\Php72\WithinNamespaceWithBraces\Foo::class)
),
Test\Util\Scenario::create(
Test\Util\PhpVersion::fromInt(70200),
'within-multiple-namespaces-with-braces',
__DIR__ . '/../Fixture/Classy/WithinMultipleNamespaces/source.php',
Construct::fromName(Test\Fixture\Classy\WithinMultipleNamespaces\Bar\Bar::class),
Construct::fromName(Test\Fixture\Classy\WithinMultipleNamespaces\Bar\Baz::class),
Construct::fromName(Test\Fixture\Classy\WithinMultipleNamespaces\Bar\Foo::class),
Construct::fromName(Test\Fixture\Classy\WithinMultipleNamespaces\Foo\Bar::class),
Construct::fromName(Test\Fixture\Classy\WithinMultipleNamespaces\Foo\Baz::class),
Construct::fromName(Test\Fixture\Classy\WithinMultipleNamespaces\Foo\Foo::class)
__DIR__ . '/../Fixture/Classy/Php72/WithinMultipleNamespaces/source.php',
Construct::fromName(Test\Fixture\Classy\Php72\WithinMultipleNamespaces\Bar\Bar::class),
Construct::fromName(Test\Fixture\Classy\Php72\WithinMultipleNamespaces\Bar\Baz::class),
Construct::fromName(Test\Fixture\Classy\Php72\WithinMultipleNamespaces\Bar\Foo::class),
Construct::fromName(Test\Fixture\Classy\Php72\WithinMultipleNamespaces\Foo\Bar::class),
Construct::fromName(Test\Fixture\Classy\Php72\WithinMultipleNamespaces\Foo\Baz::class),
Construct::fromName(Test\Fixture\Classy\Php72\WithinMultipleNamespaces\Foo\Foo::class)
),
Test\Util\Scenario::create(
Test\Util\PhpVersion::fromInt(70200),
'within-namespace-with-single-segment',
__DIR__ . '/../Fixture/Classy/WithinNamespaceWithSingleSegment/source.php',
__DIR__ . '/../Fixture/Classy/Php72/WithinNamespaceWithSingleSegment/source.php',
Construct::fromName('Ergebnis\\Bar'),
Construct::fromName('Ergebnis\\Baz'),
Construct::fromName('Ergebnis\\Foo')
),
Test\Util\Scenario::create(
Test\Util\PhpVersion::fromInt(70200),
'with-methods-named-after-keywords',
__DIR__ . '/../Fixture/Classy/WithMethodsNamedAfterKeywords/source.php',
Construct::fromName(Test\Fixture\Classy\WithMethodsNamedAfterKeywords\Foo::class)
__DIR__ . '/../Fixture/Classy/Php72/WithMethodsNamedAfterKeywords/source.php',
Construct::fromName(Test\Fixture\Classy\Php72\WithMethodsNamedAfterKeywords\Foo::class)
),
/**
* @see https://github.com/zendframework/zend-file/pull/41
*/
Test\Util\Scenario::create(
Test\Util\PhpVersion::fromInt(70200),
'with-methods-named-after-keywords-and-return-type',
__DIR__ . '/../Fixture/Classy/WithMethodsNamedAfterKeywordsAndReturnType/source.php',
Construct::fromName(Test\Fixture\Classy\WithMethodsNamedAfterKeywordsAndReturnType\Foo::class)
__DIR__ . '/../Fixture/Classy/Php72/WithMethodsNamedAfterKeywordsAndReturnType/source.php',
Construct::fromName(Test\Fixture\Classy\Php72\WithMethodsNamedAfterKeywordsAndReturnType\Foo::class)
),
Test\Util\Scenario::create(
Test\Util\PhpVersion::fromInt(70200),
'without-namespace',
__DIR__ . '/../Fixture/Classy/WithoutNamespace/source.php',
__DIR__ . '/../Fixture/Classy/Php72/WithoutNamespace/source.php',
Construct::fromName('Bar'),
Construct::fromName('Baz'),
Construct::fromName('Foo')
),
Test\Util\Scenario::create(
Test\Util\PhpVersion::fromInt(70200),
'without-namespace-and-multi-line-comments',
__DIR__ . '/../Fixture/Classy/WithoutNamespaceAndMultiLineComments/source.php',
__DIR__ . '/../Fixture/Classy/Php72/WithoutNamespaceAndMultiLineComments/source.php',
Construct::fromName('Quux'),
Construct::fromName('Quuz'),
Construct::fromName('Qux')
),
Test\Util\Scenario::create(
Test\Util\PhpVersion::fromInt(70200),
'without-namespace-and-shell-line-comments',
__DIR__ . '/../Fixture/Classy/WithoutNamespaceAndShellStyleComments/source.php',
__DIR__ . '/../Fixture/Classy/Php72/WithoutNamespaceAndShellStyleComments/source.php',
Construct::fromName('Corge'),
Construct::fromName('Garply'),
Construct::fromName('Grault')
),
Test\Util\Scenario::create(
Test\Util\PhpVersion::fromInt(70200),
'without-namespace-and-single-line-comments',
__DIR__ . '/../Fixture/Classy/WithoutNamespaceAndSingleLineComments/source.php',
__DIR__ . '/../Fixture/Classy/Php72/WithoutNamespaceAndSingleLineComments/source.php',
Construct::fromName('Fred'),
Construct::fromName('Plugh'),
Construct::fromName('Waldo')
Expand Down