mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-13 12:33:52 +01:00
Restructure the tests files.
This commit is contained in:
parent
b6f818a7c8
commit
3c4f4315f8
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\CodingStyle\Tests\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector\Fixture;
|
||||
|
||||
class ParentWithPublicConstructor
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -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'];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user