mirror of
https://github.com/rectorphp/rector.git
synced 2025-03-14 20:39:43 +01:00
remove issue-tests, already covered in specific rule tests
This commit is contained in:
parent
76d8044eb0
commit
574de08dfa
@ -227,8 +227,7 @@
|
||||
"rules/cakephp/tests/Rector/StaticCall/AppUsesStaticCallToUseStatementRector/Source",
|
||||
"tests/Source",
|
||||
"rules/psr4/tests/Rector/MultipleClassFileToPsr4ClassesRector/Source",
|
||||
"tests/Rector/Namespace_/PseudoNamespaceToNamespaceRector/Source",
|
||||
"tests/Issues/Issue1243/Source"
|
||||
"tests/Rector/Namespace_/PseudoNamespaceToNamespaceRector/Source"
|
||||
],
|
||||
"files": [
|
||||
"rules/coding-style/tests/Rector/Throw_/AnnotateThrowablesRector/Source/i_throw_an_exception.func.php",
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\Core\Tests\Issues\Issue594\Fixture;
|
||||
namespace Rector\Symfony\Tests\Rector\HttpKernel\GetRequestRector\Fixture;
|
||||
|
||||
use Rector\Symfony\Tests\Rector\Source\AbstractSymfonyController;
|
||||
|
||||
@ -16,7 +16,7 @@ class SomeController extends AbstractSymfonyController
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\Core\Tests\Issues\Issue594\Fixture;
|
||||
namespace Rector\Symfony\Tests\Rector\HttpKernel\GetRequestRector\Fixture;
|
||||
|
||||
use Rector\Symfony\Tests\Rector\Source\AbstractSymfonyController;
|
||||
|
@ -1,25 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\Core\Tests\Issues\Issue1225\Fixture;
|
||||
|
||||
function issue1225()
|
||||
{
|
||||
$safeTwigEnvironment = new \Twig_Environment(
|
||||
new \Twig_Loader_Array([])
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\Core\Tests\Issues\Issue1225\Fixture;
|
||||
|
||||
function issue1225()
|
||||
{
|
||||
$safeTwigEnvironment = new \Twig\Environment(
|
||||
new \Twig\Loader\ArrayLoader([])
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\Core\Tests\Issues\Issue1225;
|
||||
|
||||
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
use Symplify\SmartFileSystem\SmartFileInfo;
|
||||
|
||||
final class Issue1225Test extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
{
|
||||
$fixtureFileInfo = new SmartFileInfo(__DIR__ . '/Fixture/fixture1225.php.inc');
|
||||
$this->doTestFileInfo($fixtureFileInfo);
|
||||
}
|
||||
|
||||
protected function provideConfig(): string
|
||||
{
|
||||
return __DIR__ . '/../../../config/set/twig/twig-underscore-to-namespace.yaml';
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\Core\Tests\Issues\Issue1225\Fixture;
|
||||
|
||||
class Issue1225
|
||||
{
|
||||
/**
|
||||
* @throws \Twig_Error_Loader
|
||||
* @throws \Twig_Error_Runtime
|
||||
* @throws \Twig_Error_Syntax
|
||||
*/
|
||||
public function render(): void
|
||||
{
|
||||
echo $this->twig->render(
|
||||
// ...
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\Core\Tests\Issues\Issue1225\Fixture;
|
||||
|
||||
class Issue1225
|
||||
{
|
||||
/**
|
||||
* @throws \Twig\Error\LoaderError
|
||||
* @throws \Twig\Error\RuntimeError
|
||||
* @throws \Twig\Error\SyntaxError
|
||||
*/
|
||||
public function render(): void
|
||||
{
|
||||
echo $this->twig->render(
|
||||
// ...
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\Core\Tests\Issues\Issue1242;
|
||||
|
||||
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
use Symplify\SmartFileSystem\SmartFileInfo;
|
||||
|
||||
final class Issue1242Test extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
{
|
||||
$fixtureFileInfo = new SmartFileInfo(__DIR__ . '/Fixture/fixture1242.php.inc');
|
||||
$this->doTestFileInfo($fixtureFileInfo);
|
||||
}
|
||||
|
||||
protected function provideConfig(): string
|
||||
{
|
||||
return __DIR__ . '/../../../config/set/twig/twig-underscore-to-namespace.yaml';
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\Core\Tests\Issues\Issue1243\Fixture;
|
||||
|
||||
class Issue1243
|
||||
{
|
||||
public function something()
|
||||
{
|
||||
/** @var \Twig_Environment $env */
|
||||
$env = $this->getTwigEnv();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\Core\Tests\Issues\Issue1243\Fixture;
|
||||
|
||||
class Issue1243
|
||||
{
|
||||
public function something()
|
||||
{
|
||||
/** @var \Twig\Environment $env */
|
||||
$env = $this->getTwigEnv();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\Core\Tests\Issues\Issue1243;
|
||||
|
||||
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
use Symplify\SmartFileSystem\SmartFileInfo;
|
||||
|
||||
final class Issue1243Test extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
{
|
||||
$fixtureFileInfo = new SmartFileInfo(__DIR__ . '/Fixture/fixture1243.php.inc');
|
||||
$this->doTestFileInfo($fixtureFileInfo);
|
||||
}
|
||||
|
||||
protected function provideConfig(): string
|
||||
{
|
||||
return __DIR__ . '/../../../config/set/twig/twig-underscore-to-namespace.yaml';
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
final class Twig_Environment
|
||||
{
|
||||
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
final class Twig_Error_Loader
|
||||
{
|
||||
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
final class Twig_Error_Runtime
|
||||
{
|
||||
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
final class Twig_Error_Syntax
|
||||
{
|
||||
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
final class Twig_Loader_Array
|
||||
{
|
||||
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\Core\Tests\Issues\Issue594;
|
||||
|
||||
use Iterator;
|
||||
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
use Rector\Symfony\Rector\HttpKernel\GetRequestRector;
|
||||
use Symplify\SmartFileSystem\SmartFileInfo;
|
||||
|
||||
final class Issue594Test extends AbstractRectorTestCase
|
||||
{
|
||||
/**
|
||||
* @dataProvider provideData()
|
||||
*/
|
||||
public function test(SmartFileInfo $fileInfo): void
|
||||
{
|
||||
$this->doTestFileInfo($fileInfo);
|
||||
}
|
||||
|
||||
public function provideData(): Iterator
|
||||
{
|
||||
return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture');
|
||||
}
|
||||
|
||||
protected function getRectorClass(): string
|
||||
{
|
||||
return GetRequestRector::class;
|
||||
}
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\Core\Tests\Issues\Issue835\Fixture {
|
||||
use Cake\View\ViewBuilder;
|
||||
|
||||
final class SomeController
|
||||
{
|
||||
public function view($id = null)
|
||||
{
|
||||
$this->viewBuilder()->layout('ajax');
|
||||
}
|
||||
|
||||
public function viewBuilder(): ViewBuilder
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Cake\View {
|
||||
class ViewBuilder { }
|
||||
}
|
||||
|
||||
?>
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\Core\Tests\Issues\Issue835\Fixture {
|
||||
use Cake\View\ViewBuilder;
|
||||
|
||||
final class SomeController
|
||||
{
|
||||
public function view($id = null)
|
||||
{
|
||||
$this->viewBuilder()->setLayout('ajax');
|
||||
}
|
||||
|
||||
public function viewBuilder(): ViewBuilder
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Cake\View {
|
||||
class ViewBuilder { }
|
||||
}
|
||||
|
||||
?>
|
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\Core\Tests\Issues\Issue835;
|
||||
|
||||
use Iterator;
|
||||
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
use Symplify\SmartFileSystem\SmartFileInfo;
|
||||
|
||||
final class Issue835Test extends AbstractRectorTestCase
|
||||
{
|
||||
/**
|
||||
* @dataProvider provideData()
|
||||
*/
|
||||
public function test(SmartFileInfo $fileInfo): void
|
||||
{
|
||||
$this->doTestFileInfo($fileInfo);
|
||||
}
|
||||
|
||||
public function provideData(): Iterator
|
||||
{
|
||||
return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture');
|
||||
}
|
||||
|
||||
protected function provideConfig(): string
|
||||
{
|
||||
return __DIR__ . '/../../../config/set/cakephp/cakephp34.yaml';
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user