remove issue-tests, already covered in specific rule tests

This commit is contained in:
TomasVotruba 2020-07-02 13:40:51 +02:00
parent 76d8044eb0
commit 574de08dfa
16 changed files with 3 additions and 313 deletions

View File

@ -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",

View File

@ -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;

View File

@ -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([])
);
}
?>

View File

@ -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';
}
}

View File

@ -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(
// ...
);
}
}
?>

View File

@ -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';
}
}

View File

@ -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();
}
}
?>

View File

@ -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';
}
}

View File

@ -1,8 +0,0 @@
<?php
declare(strict_types=1);
final class Twig_Environment
{
}

View File

@ -1,8 +0,0 @@
<?php
declare(strict_types=1);
final class Twig_Error_Loader
{
}

View File

@ -1,8 +0,0 @@
<?php
declare(strict_types=1);
final class Twig_Error_Runtime
{
}

View File

@ -1,8 +0,0 @@
<?php
declare(strict_types=1);
final class Twig_Error_Syntax
{
}

View File

@ -1,8 +0,0 @@
<?php
declare(strict_types=1);
final class Twig_Loader_Array
{
}

View File

@ -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;
}
}

View File

@ -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 { }
}
?>

View File

@ -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';
}
}