remove duplicated tests

This commit is contained in:
TomasVotruba 2020-02-14 23:51:38 +01:00
parent 69c18b87ca
commit 77c9d2924e
10 changed files with 0 additions and 295 deletions

View File

@ -1,30 +0,0 @@
<?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class CustomExceptionAlreadyAnnotatedInMethod
{
public function throwException()
{
throw new \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException();
}
}
?>
-----
<?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class CustomExceptionAlreadyAnnotatedInMethod
{
/**
* @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException
*/
public function throwException()
{
throw new \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException();
}
}
?>

View File

@ -1,38 +0,0 @@
<?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class CustomExceptionInMethodWithDocblock
{
/**
* This is a comment.
*
* @param int $code
*/
public function throwException(int $code)
{
throw new \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException('', $code);
}
}
?>
-----
<?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class CustomExceptionInMethodWithDocblock
{
/**
* This is a comment.
*
* @param int $code
* @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException
*/
public function throwException(int $code)
{
throw new \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException('', $code);
}
}
?>

View File

@ -1,40 +0,0 @@
<?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/**
* @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException
*/
function throwCustomExceptionThrownInTwoFunctionsFirst()
{
throw new \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException();
}
function throwCustomExceptionThrownInTwoFunctionsSecond()
{
throw new \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException();
}
?>
-----
<?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/**
* @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException
*/
function throwCustomExceptionThrownInTwoFunctionsFirst()
{
throw new \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException();
}
/**
* @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException
*/
function throwCustomExceptionThrownInTwoFunctionsSecond()
{
throw new \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException();
}
?>

View File

@ -1,46 +0,0 @@
<?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class CustomExceptionThrownInTwoMethods
{
/**
* @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException
*/
public function throwException()
{
throw new \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException();
}
public function anotherThrowException()
{
throw new \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException();
}
}
?>
-----
<?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class CustomExceptionThrownInTwoMethods
{
/**
* @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException
*/
public function throwException()
{
throw new \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException();
}
/**
* @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException
*/
public function anotherThrowException()
{
throw new \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException();
}
}
?>

View File

@ -1,11 +0,0 @@
<?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/**
* @throws \RuntimeException
*/
function throwRootExceptionAlreadyAnnotatedInFunction()
{
throw new \RuntimeException();
}

View File

@ -1,14 +0,0 @@
<?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class RootExceptionAlreadyAnnotatedInMethod
{
/**
* @throws \RuntimeException
*/
public function throwException()
{
throw new \RuntimeException();
}
}

View File

@ -1,30 +0,0 @@
<?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class RootExceptionInMethodWithoutDocblock
{
public function throwException()
{
throw new \RuntimeException();
}
}
?>
-----
<?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class RootExceptionInMethodWithoutDocblock
{
/**
* @throws \RuntimeException
*/
public function throwException()
{
throw new \RuntimeException();
}
}
?>

View File

@ -1,40 +0,0 @@
<?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/**
* @throws \RuntimeException
*/
function throwRootExceptionThrownInTwoFunctionsFirst()
{
throw new \RuntimeException();
}
function throwRootExceptionThrownInTwoFunctionsSecond()
{
throw new \RuntimeException();
}
?>
-----
<?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/**
* @throws \RuntimeException
*/
function throwRootExceptionThrownInTwoFunctionsFirst()
{
throw new \RuntimeException();
}
/**
* @throws \RuntimeException
*/
function throwRootExceptionThrownInTwoFunctionsSecond()
{
throw new \RuntimeException();
}
?>

View File

@ -1,46 +0,0 @@
<?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class RootExceptionThrownInTwoMethods
{
/**
* @throws \RuntimeException
*/
public function throwException()
{
throw new \RuntimeException();
}
public function anotherThrowException()
{
throw new \RuntimeException();
}
}
?>
-----
<?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class RootExceptionThrownInTwoMethods
{
/**
* @throws \RuntimeException
*/
public function throwException()
{
throw new \RuntimeException();
}
/**
* @throws \RuntimeException
*/
public function anotherThrowException()
{
throw new \RuntimeException();
}
}
?>