Skip to content

Commit

Permalink
Fix: Adjust test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Jun 17, 2024
1 parent 566837a commit 020ffc3
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@ class Foo
{
public function class(): string
{
return '';
}

public function enum(): string
{
return '';
}

public function interface(): string
{
return '';
}

public function trait(): string
{
return '';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

/* foo */ trait /* bar */ Baz /* baz */ {}

/* foo */ enum /* bar */ Qux /* baz */ {}
/* foo */ enum Qux /* baz */ {}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ trait # foo
Baz // bar
{}

enum # foo
Baz // bar
enum
Qux // bar
{}
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ interface // foo
trait // foo
Baz // bar
{}

enum
Qux // bar
{}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?php

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

/* foo */ interface /* bar */ Quux /* baz */ {}
/* foo */ interface /* bar */ Bar /* baz */ {}

/* foo */ trait /* bar */ Quuz /* baz */ {}
/* foo */ trait /* bar */ Baz /* baz */ {}

/* foo */ enum Qux /* baz */ {}
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
<?php

class # foo
Corge # bar
Foo # bar
{}

interface # foo
Garply # bar
Bar # bar
{}

trait # foo
Grault // bar
Baz // bar
{}

enum
Qux // bar
{}
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
<?php

class // foo
Waldo // bar
Foo // bar
{}

interface // foo
Fred // bar
Bar // bar
{}

trait // foo
Plugh // bar
Baz // bar
{}

enum
Qux // bar
{}
19 changes: 11 additions & 8 deletions test/Unit/ConstructsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,25 +223,28 @@ public static function provideScenarioWithClassyConstructsOnPhp81(): \Generator
Test\Util\PhpVersion::fromInt(80100),
'php81-without-namespace-and-multi-line-comments',
__DIR__ . '/../Fixture/Classy/Php81/WithoutNamespaceAndMultiLineComments/source.php',
Construct::fromName('Quux'),
Construct::fromName('Quuz'),
Construct::fromName('Bar'),
Construct::fromName('Baz'),
Construct::fromName('Foo'),
Construct::fromName('Qux'),
),
Test\Util\Scenario::create(
Test\Util\PhpVersion::fromInt(80100),
'php81-without-namespace-and-shell-line-comments',
__DIR__ . '/../Fixture/Classy/Php81/WithoutNamespaceAndShellStyleComments/source.php',
Construct::fromName('Corge'),
Construct::fromName('Garply'),
Construct::fromName('Grault'),
Construct::fromName('Bar'),
Construct::fromName('Baz'),
Construct::fromName('Foo'),
Construct::fromName('Qux'),
),
Test\Util\Scenario::create(
Test\Util\PhpVersion::fromInt(80100),
'php81-without-namespace-and-single-line-comments',
__DIR__ . '/../Fixture/Classy/Php81/WithoutNamespaceAndSingleLineComments/source.php',
Construct::fromName('Fred'),
Construct::fromName('Plugh'),
Construct::fromName('Waldo'),
Construct::fromName('Bar'),
Construct::fromName('Baz'),
Construct::fromName('Foo'),
Construct::fromName('Qux'),
),
];

Expand Down

0 comments on commit 020ffc3

Please sign in to comment.