From e46fe290d8696139ff59e2432021620ffc710d4b Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 6 Nov 2021 16:31:24 +0700 Subject: [PATCH] [PhpSpecToPHPUnit] Move outside class to Source when possible (#1165) --- .../PhpSpecToPHPUnitRector/Fixture/fixture.php.inc | 4 ++++ .../Variable/PhpSpecToPHPUnitRector/Source/Address.php | 10 ++++++++++ .../{Fixture => Source}/Cart.php | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 rules-tests/PhpSpecToPHPUnit/Rector/Variable/PhpSpecToPHPUnitRector/Source/Address.php rename rules-tests/PhpSpecToPHPUnit/Rector/Variable/PhpSpecToPHPUnitRector/{Fixture => Source}/Cart.php (83%) diff --git a/rules-tests/PhpSpecToPHPUnit/Rector/Variable/PhpSpecToPHPUnitRector/Fixture/fixture.php.inc b/rules-tests/PhpSpecToPHPUnit/Rector/Variable/PhpSpecToPHPUnitRector/Fixture/fixture.php.inc index 74173d7edc0..88cb2aad47b 100644 --- a/rules-tests/PhpSpecToPHPUnit/Rector/Variable/PhpSpecToPHPUnitRector/Fixture/fixture.php.inc +++ b/rules-tests/PhpSpecToPHPUnit/Rector/Variable/PhpSpecToPHPUnitRector/Fixture/fixture.php.inc @@ -3,6 +3,8 @@ namespace spec\Rector\Tests\PhpSpecToPHPUnit\Rector\Variable\PhpSpecToPHPUnitRector\Fixture; use PhpSpec\ObjectBehavior; +use Rector\Tests\PhpSpecToPHPUnit\Rector\Variable\PhpSpecToPHPUnitRector\Source\Address; +use Rector\Tests\PhpSpecToPHPUnit\Rector\Variable\PhpSpecToPHPUnitRector\Source\Cart; class CreateMeSpec extends ObjectBehavior { @@ -48,6 +50,8 @@ class CreateMeSpec extends ObjectBehavior namespace Tests\Rector\Tests\PhpSpecToPHPUnit\Rector\Variable\PhpSpecToPHPUnitRector\Fixture; use PhpSpec\ObjectBehavior; +use Rector\Tests\PhpSpecToPHPUnit\Rector\Variable\PhpSpecToPHPUnitRector\Source\Address; +use Rector\Tests\PhpSpecToPHPUnit\Rector\Variable\PhpSpecToPHPUnitRector\Source\Cart; class CreateMeTest extends \PHPUnit\Framework\TestCase { diff --git a/rules-tests/PhpSpecToPHPUnit/Rector/Variable/PhpSpecToPHPUnitRector/Source/Address.php b/rules-tests/PhpSpecToPHPUnit/Rector/Variable/PhpSpecToPHPUnitRector/Source/Address.php new file mode 100644 index 00000000000..e225585d27a --- /dev/null +++ b/rules-tests/PhpSpecToPHPUnit/Rector/Variable/PhpSpecToPHPUnitRector/Source/Address.php @@ -0,0 +1,10 @@ +