Restructure the tests files.

This commit is contained in:
Dorian Villet 2019-10-03 00:41:11 +02:00
parent b6f818a7c8
commit 3c4f4315f8
4 changed files with 30 additions and 20 deletions

View File

@ -0,0 +1,12 @@
<?php
declare(strict_types=1);
namespace Rector\CodingStyle\Tests\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector\Fixture;
class ParentWithPublicConstructor
{
public function __construct()
{
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace Rector\CodingStyle\Tests\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector\Fixture;
final class SkipSelfCtor extends ParentWithPublicConstructor
{
private function __construct()
{
}
public static function create()
{
return new self();
}
}

View File

@ -2,19 +2,6 @@
namespace Rector\CodingStyle\Tests\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector\Fixture;
final class SkipSelfCtor extends ParentWithPublicConstructor
{
private function __construct()
{
// do something
}
public static function create()
{
return new self();
}
}
abstract class SkipStaticCtor extends ParentWithPublicConstructor
{
protected function __construct()
@ -32,13 +19,8 @@ class InheritedSkipCtor extends SkipStaticCtor
{
protected function __construct()
{
parent::__construct();
// do something more
}
}
class ParentWithPublicConstructor
{
public function __construct()
{
}
}

View File

@ -21,6 +21,7 @@ final class SkipParentConstructOverrideInPHP72Test extends AbstractRectorTestCas
public function provideDataForTest(): Iterator
{
yield [__DIR__ . '/Fixture/skip_self_ctor.php.inc'];
yield [__DIR__ . '/Fixture/skip_static_ctor.php.inc'];
}