mirror of https://github.com/rectorphp/rector.git
remove duplicated tests
This commit is contained in:
parent
69c18b87ca
commit
77c9d2924e
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -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();
|
||||
}
|
||||
|
||||
?>
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -1,11 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
|
||||
|
||||
/**
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
function throwRootExceptionAlreadyAnnotatedInFunction()
|
||||
{
|
||||
throw new \RuntimeException();
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
|
||||
|
||||
class RootExceptionAlreadyAnnotatedInMethod
|
||||
{
|
||||
/**
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function throwException()
|
||||
{
|
||||
throw new \RuntimeException();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -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();
|
||||
}
|
||||
|
||||
?>
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue