Remove @throws annotation from some unit tests.

This commit is contained in:
Nestor Soriano 2020-07-15 09:40:53 +02:00
parent 53e1f23af5
commit abf53086ca
2 changed files with 0 additions and 12 deletions

View File

@ -65,8 +65,6 @@ class AbstractServiceProviderTest extends \WC_Unit_Test_Case {
/**
* @testdox 'add_with_auto_arguments' should throw an exception if an invalid class name is passed.
*
* @throws \Exception Invalid class name passed.
*/
public function test_add_with_auto_arguments_throws_on_non_class_passed() {
$this->expectException( \Exception::class );
@ -77,8 +75,6 @@ class AbstractServiceProviderTest extends \WC_Unit_Test_Case {
/**
* @testdox 'add_with_auto_arguments' should throw an exception if the passed class has a private constructor.
*
* @throws \Exception The passed class has a private constructor.
*/
public function test_add_with_auto_arguments_throws_on_private_constructor() {
$this->expectException( \Exception::class );
@ -89,8 +85,6 @@ class AbstractServiceProviderTest extends \WC_Unit_Test_Case {
/**
* @testdox 'add_with_auto_arguments' should throw an exception if the passed class has a constructor argument without type hint.
*
* @throws \Exception The passed class has a constructor argument without type hint.
*/
public function test_add_with_auto_arguments_throws_on_constructor_argument_without_type_hint() {
$this->expectException( \Exception::class );
@ -101,8 +95,6 @@ class AbstractServiceProviderTest extends \WC_Unit_Test_Case {
/**
* @testdox 'add_with_auto_arguments' should throw an exception if the passed class has a constructor argument with a scalar type hint.
*
* @throws \Exception The passed class has a constructor argument with a scalar type hint.
*/
public function test_add_with_auto_arguments_throws_on_constructor_argument_with_scalar_type_hint() {
$this->expectException( \Exception::class );

View File

@ -32,8 +32,6 @@ class ExtendedContainerTest extends \WC_Unit_Test_Case {
/**
* @testdox 'add' should throw an exception when trying to register a class not in the WooCommerce root namespace.
*
* @throws \Exception Attempt to register a class not in the WooCommerce root namespace.
*/
public function test_add_throws_when_trying_to_register_class_in_forbidden_namespace() {
$external_class = \League\Container\Container::class;
@ -57,8 +55,6 @@ class ExtendedContainerTest extends \WC_Unit_Test_Case {
/**
* @testdox 'replace' should throw an exception when trying to replace a class that has not been previously registered.
*
* @throws \Exception Attempt to replace a class that has not been previously registered.
*/
public function test_replace_throws_if_class_has_not_been_registered() {
$this->expectException( \Exception::class );