From d40917e50c190f493f1b914d46d411f402f2197c Mon Sep 17 00:00:00 2001 From: Bl00D4NGEL Date: Mon, 29 Nov 2021 20:54:02 +0100 Subject: [PATCH] create failing test case --- ...tionAndNewLineAfterStatementRectorTest.php | 36 +++++++++++++++++++ .../Issues/Issue6840/Fixture/fixture.php.inc | 32 +++++++++++++++++ .../Issue6840/config/configured_rule.php | 14 ++++++++ 3 files changed, 82 insertions(+) create mode 100644 tests/Issues/Issue6840/ClassPropertyPromotionAndNewLineAfterStatementRectorTest.php create mode 100644 tests/Issues/Issue6840/Fixture/fixture.php.inc create mode 100644 tests/Issues/Issue6840/config/configured_rule.php diff --git a/tests/Issues/Issue6840/ClassPropertyPromotionAndNewLineAfterStatementRectorTest.php b/tests/Issues/Issue6840/ClassPropertyPromotionAndNewLineAfterStatementRectorTest.php new file mode 100644 index 00000000000..98bc6d5506d --- /dev/null +++ b/tests/Issues/Issue6840/ClassPropertyPromotionAndNewLineAfterStatementRectorTest.php @@ -0,0 +1,36 @@ +doTestFileInfo($fileInfo); + } + + /** + * @return Iterator + */ + public function provideData(): Iterator + { + return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); + } + + public function provideConfigFilePath(): string + { + return __DIR__ . '/config/configured_rule.php'; + } +} diff --git a/tests/Issues/Issue6840/Fixture/fixture.php.inc b/tests/Issues/Issue6840/Fixture/fixture.php.inc new file mode 100644 index 00000000000..ddc8f562d80 --- /dev/null +++ b/tests/Issues/Issue6840/Fixture/fixture.php.inc @@ -0,0 +1,32 @@ +imageId = $imageId; + $this->imageSize = []; + } +} +?> +----- +imageSize = []; + } +} +?> diff --git a/tests/Issues/Issue6840/config/configured_rule.php b/tests/Issues/Issue6840/config/configured_rule.php new file mode 100644 index 00000000000..f7475b64a6c --- /dev/null +++ b/tests/Issues/Issue6840/config/configured_rule.php @@ -0,0 +1,14 @@ +services(); + $services->set(ClassPropertyAssignToConstructorPromotionRector::class); + $services->set(NewlineAfterStatementRector::class); +};