From e5ba457ebfc1fd38affc650bdf5160a92ea803b2 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Thu, 8 Feb 2024 07:57:14 +0100 Subject: [PATCH] Closes #5536 --- .../MockObject/Generator/Generator.php | 19 +++---------- src/Framework/MockObject/MockBuilder.php | 1 - .../Runtime/Api/GeneratedAsMockObject.php | 21 --------------- .../Runtime/Api/GeneratedAsTestStub.php | 21 --------------- .../MockObject/Runtime/Api/MockObjectApi.php | 27 ------------------- .../Runtime/Interface/StubInternal.php | 2 -- .../Runtime/ReturnValueGenerator.php | 2 +- src/Framework/TestCase.php | 2 -- .../mock-objects/generator/232.phpt | 2 -- .../3154_namespaced_constant_resolving.phpt | 2 -- .../mock-objects/generator/3967.phpt | 2 -- .../mock-objects/generator/397.phpt | 2 -- .../mock-objects/generator/4139.phpt | 3 +-- .../generator/abstract_class.phpt | 2 -- .../mock-objects/generator/class.phpt | 2 -- .../generator/class_call_parent_clone.phpt | 2 -- .../class_call_parent_constructor.phpt | 2 -- .../class_dont_call_parent_clone.phpt | 2 -- .../class_dont_call_parent_constructor.phpt | 2 -- ...ing_interface_call_parent_constructor.phpt | 2 -- ...nterface_dont_call_parent_constructor.phpt | 2 -- .../generator/class_nonexistent_method.phpt | 2 -- .../mock-objects/generator/class_partial.phpt | 2 -- .../class_with_deprecated_method.phpt | 2 -- .../generator/class_with_final_method.phpt | 2 -- ...ullable_typehinted_variadic_arguments.phpt | 2 -- ...od_with_typehinted_variadic_arguments.phpt | 2 -- ...s_with_method_with_variadic_arguments.phpt | 2 -- .../constant_as_parameter_default_value.phpt | 2 -- .../mock-objects/generator/interface.phpt | 2 -- .../invocation_object_clone_object.phpt | 2 -- .../generator/namespaced_class.phpt | 2 -- .../namespaced_class_call_parent_clone.phpt | 2 -- ...espaced_class_call_parent_constructor.phpt | 2 -- ...mespaced_class_dont_call_parent_clone.phpt | 2 -- ...ed_class_dont_call_parent_constructor.phpt | 2 -- ...ing_interface_call_parent_constructor.phpt | 2 -- ...nterface_dont_call_parent_constructor.phpt | 2 -- .../generator/namespaced_class_partial.phpt | 2 -- .../generator/namespaced_interface.phpt | 2 -- .../generator/nonexistent_class.phpt | 2 -- .../nonexistent_class_with_namespace.phpt | 2 -- ...ith_namespace_starting_with_separator.phpt | 2 -- .../generator/nullable_types.phpt | 2 -- .../nullable_union_type_parameter.phpt | 2 -- .../generator/nullable_union_type_return.phpt | 2 -- .../mock-objects/generator/parameter_dnf.phpt | 2 -- .../generator/parameter_false.phpt | 2 -- .../generator/parameter_intersection.phpt | 2 -- .../generator/parameter_null.phpt | 2 -- .../generator/parameter_true.phpt | 2 -- .../generator/parameter_union.phpt | 2 -- .../return_type_declarations_closure.phpt | 2 -- .../return_type_declarations_dnf.phpt | 2 -- .../return_type_declarations_false.phpt | 2 -- .../return_type_declarations_final.phpt | 2 -- .../return_type_declarations_generator.phpt | 2 -- ...clarations_generator_empty_by_default.phpt | 2 +- ...return_type_declarations_intersection.phpt | 2 -- .../return_type_declarations_never.phpt | 2 -- .../return_type_declarations_null.phpt | 2 -- .../return_type_declarations_nullable.phpt | 2 -- ...eturn_type_declarations_object_method.phpt | 2 -- .../return_type_declarations_parent.phpt | 2 -- .../return_type_declarations_self.phpt | 2 -- .../return_type_declarations_static.phpt | 2 -- ...eturn_type_declarations_static_method.phpt | 2 -- .../return_type_declarations_true.phpt | 2 -- .../return_type_declarations_union.phpt | 2 -- .../return_type_declarations_void.phpt | 2 -- .../generator/scalar_type_declarations.phpt | 2 -- .../Framework/MockObject/MockObjectTest.php | 11 -------- 72 files changed, 6 insertions(+), 227 deletions(-) delete mode 100644 src/Framework/MockObject/Runtime/Api/GeneratedAsMockObject.php delete mode 100644 src/Framework/MockObject/Runtime/Api/GeneratedAsTestStub.php diff --git a/src/Framework/MockObject/Generator/Generator.php b/src/Framework/MockObject/Generator/Generator.php index a48e5b8caa5..94ca5a9ee72 100644 --- a/src/Framework/MockObject/Generator/Generator.php +++ b/src/Framework/MockObject/Generator/Generator.php @@ -34,8 +34,6 @@ use PHPUnit\Framework\MockObject\ConfigurableMethod; use PHPUnit\Framework\MockObject\DoubledCloneMethod; use PHPUnit\Framework\MockObject\ErrorCloneMethod; -use PHPUnit\Framework\MockObject\GeneratedAsMockObject; -use PHPUnit\Framework\MockObject\GeneratedAsTestStub; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\MockObject\MockObjectApi; @@ -92,7 +90,7 @@ final class Generator * @throws RuntimeException * @throws UnknownTypeException */ - public function testDouble(string $type, bool $mockObject, bool $markAsMockObject, ?array $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $returnValueGeneration = true): MockObject|Stub + public function testDouble(string $type, bool $mockObject, ?array $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $returnValueGeneration = true): MockObject|Stub { if ($type === Traversable::class) { $type = Iterator::class; @@ -105,7 +103,6 @@ public function testDouble(string $type, bool $mockObject, bool $markAsMockObjec $mock = $this->generate( $type, $mockObject, - $markAsMockObject, $methods, $mockClassName, $callOriginalClone, @@ -190,7 +187,6 @@ public function testDoubleForInterfaceIntersection(array $interfaces, bool $mock return $this->testDouble( $intersectionName, $mockObject, - $mockObject, returnValueGeneration: $returnValueGeneration, ); } @@ -205,13 +201,12 @@ public function testDoubleForInterfaceIntersection(array $interfaces, bool $mock * * @see https://github.com/sebastianbergmann/phpunit/issues/5476 */ - public function generate(string $type, bool $mockObject, bool $markAsMockObject, ?array $methods = null, string $mockClassName = '', bool $callOriginalClone = true): MockClass + public function generate(string $type, bool $mockObject, ?array $methods = null, string $mockClassName = '', bool $callOriginalClone = true): MockClass { if ($mockClassName !== '') { return $this->generateCodeForTestDoubleClass( $type, $mockObject, - $markAsMockObject, $methods, $mockClassName, $callOriginalClone, @@ -221,7 +216,6 @@ public function generate(string $type, bool $mockObject, bool $markAsMockObject, $key = md5( $type . ($mockObject ? 'MockObject' : 'TestStub') . - ($markAsMockObject ? 'MockObject' : 'TestStub') . serialize($methods) . serialize($callOriginalClone), ); @@ -230,7 +224,6 @@ public function generate(string $type, bool $mockObject, bool $markAsMockObject, self::$cache[$key] = $this->generateCodeForTestDoubleClass( $type, $mockObject, - $markAsMockObject, $methods, $mockClassName, $callOriginalClone, @@ -313,7 +306,7 @@ private function getObject(MockType $mockClass, bool $callOriginalConstructor = * @throws ReflectionException * @throws RuntimeException */ - private function generateCodeForTestDoubleClass(string $type, bool $mockObject, bool $markAsMockObject, ?array $explicitMethods, string $mockClassName, bool $callOriginalClone): MockClass + private function generateCodeForTestDoubleClass(string $type, bool $mockObject, ?array $explicitMethods, string $mockClassName, bool $callOriginalClone): MockClass { $classTemplate = $this->loadTemplate('test_double_class.tpl'); $additionalInterfaces = []; @@ -480,12 +473,6 @@ private function generateCodeForTestDoubleClass(string $type, bool $mockObject, $traits[] = MockObjectApi::class; } - if ($markAsMockObject) { - $traits[] = GeneratedAsMockObject::class; - } else { - $traits[] = GeneratedAsTestStub::class; - } - if ($mockMethods->hasMethod('method') || (isset($class) && $class->hasMethod('method'))) { throw new MethodNamedMethodException; } diff --git a/src/Framework/MockObject/MockBuilder.php b/src/Framework/MockObject/MockBuilder.php index 1c93db7da6c..bb79f38c59a 100644 --- a/src/Framework/MockObject/MockBuilder.php +++ b/src/Framework/MockObject/MockBuilder.php @@ -84,7 +84,6 @@ public function getMock(): MockObject $object = $this->generator->testDouble( $this->type, true, - true, !$this->emptyMethodsArray ? $this->methods : null, $this->constructorArgs, $this->mockClassName ?? '', diff --git a/src/Framework/MockObject/Runtime/Api/GeneratedAsMockObject.php b/src/Framework/MockObject/Runtime/Api/GeneratedAsMockObject.php deleted file mode 100644 index 66ed17679cd..00000000000 --- a/src/Framework/MockObject/Runtime/Api/GeneratedAsMockObject.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @internal This trait is not covered by the backward compatibility promise for PHPUnit - */ -trait GeneratedAsMockObject -{ - public function __phpunit_wasGeneratedAsMockObject(): true - { - return true; - } -} diff --git a/src/Framework/MockObject/Runtime/Api/GeneratedAsTestStub.php b/src/Framework/MockObject/Runtime/Api/GeneratedAsTestStub.php deleted file mode 100644 index 9009bece743..00000000000 --- a/src/Framework/MockObject/Runtime/Api/GeneratedAsTestStub.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @internal This trait is not covered by the backward compatibility promise for PHPUnit - */ -trait GeneratedAsTestStub -{ - public function __phpunit_wasGeneratedAsMockObject(): false - { - return false; - } -} diff --git a/src/Framework/MockObject/Runtime/Api/MockObjectApi.php b/src/Framework/MockObject/Runtime/Api/MockObjectApi.php index 837c263cef9..3909f51fed4 100644 --- a/src/Framework/MockObject/Runtime/Api/MockObjectApi.php +++ b/src/Framework/MockObject/Runtime/Api/MockObjectApi.php @@ -9,10 +9,6 @@ */ namespace PHPUnit\Framework\MockObject; -use function assert; -use PHPUnit\Event\Code\NoTestCaseObjectOnCallStackException; -use PHPUnit\Event\Code\TestMethodBuilder; -use PHPUnit\Event\Facade as EventFacade; use PHPUnit\Framework\MockObject\Builder\InvocationMocker as InvocationMockerBuilder; use PHPUnit\Framework\MockObject\Rule\InvocationOrder; @@ -45,29 +41,6 @@ abstract public function __phpunit_unsetInvocationMocker(): void; public function expects(InvocationOrder $matcher): InvocationMockerBuilder { - assert($this instanceof StubInternal); - - if (!$this->__phpunit_wasGeneratedAsMockObject()) { - $message = 'Expectations configured on test doubles that are created as test stubs are no longer verified since PHPUnit 10. Test doubles that are created as test stubs will no longer have the expects() method in PHPUnit 12. Update your test code to use createMock() instead of createStub(), for example.'; - - try { - $test = TestMethodBuilder::fromCallStack(); - - if (!$this->__phpunit_state()->wasDeprecationAlreadyEmittedFor($test->id())) { - EventFacade::emitter()->testTriggeredPhpunitDeprecation( - $test, - $message, - ); - - $this->__phpunit_state()->deprecationWasEmittedFor($test->id()); - } - // @codeCoverageIgnoreStart - } catch (NoTestCaseObjectOnCallStackException) { - EventFacade::emitter()->testRunnerTriggeredDeprecation($message); - // @codeCoverageIgnoreEnd - } - } - return $this->__phpunit_getInvocationHandler()->expects($matcher); } } diff --git a/src/Framework/MockObject/Runtime/Interface/StubInternal.php b/src/Framework/MockObject/Runtime/Interface/StubInternal.php index 57e46f3df09..4fb7307a113 100644 --- a/src/Framework/MockObject/Runtime/Interface/StubInternal.php +++ b/src/Framework/MockObject/Runtime/Interface/StubInternal.php @@ -19,6 +19,4 @@ public function __phpunit_state(): TestDoubleState; public function __phpunit_getInvocationHandler(): InvocationHandler; public function __phpunit_unsetInvocationMocker(): void; - - public function __phpunit_wasGeneratedAsMockObject(): bool; } diff --git a/src/Framework/MockObject/Runtime/ReturnValueGenerator.php b/src/Framework/MockObject/Runtime/ReturnValueGenerator.php index 55e4c673c2b..d4ad4b2303f 100644 --- a/src/Framework/MockObject/Runtime/ReturnValueGenerator.php +++ b/src/Framework/MockObject/Runtime/ReturnValueGenerator.php @@ -204,7 +204,7 @@ private function newInstanceOf(string $stubClassName, string $className, string private function testDoubleFor(string $type, string $className, string $methodName): Stub { try { - return (new Generator)->testDouble($type, false, false, [], [], '', false); + return (new Generator)->testDouble($type, false, [], [], '', false); } catch (Throwable $t) { throw new RuntimeException( sprintf( diff --git a/src/Framework/TestCase.php b/src/Framework/TestCase.php index 53d98eac541..2ddba4c1435 100644 --- a/src/Framework/TestCase.php +++ b/src/Framework/TestCase.php @@ -1180,7 +1180,6 @@ final protected function createMock(string $originalClassName): MockObject $mock = (new MockGenerator)->testDouble( $originalClassName, true, - true, callOriginalConstructor: false, callOriginalClone: false, returnValueGeneration: self::generateReturnValuesForTestDoubles(), @@ -2172,7 +2171,6 @@ final protected static function createStub(string $originalClassName): Stub { $stub = (new MockGenerator)->testDouble( $originalClassName, - true, false, callOriginalConstructor: false, callOriginalClone: false, diff --git a/tests/end-to-end/mock-objects/generator/232.phpt b/tests/end-to-end/mock-objects/generator/232.phpt index be843f56d89..1c8a1c39311 100644 --- a/tests/end-to-end/mock-objects/generator/232.phpt +++ b/tests/end-to-end/mock-objects/generator/232.phpt @@ -45,7 +45,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -60,7 +59,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/3154_namespaced_constant_resolving.phpt b/tests/end-to-end/mock-objects/generator/3154_namespaced_constant_resolving.phpt index efa1eea047b..c0c8a358e36 100644 --- a/tests/end-to-end/mock-objects/generator/3154_namespaced_constant_resolving.phpt +++ b/tests/end-to-end/mock-objects/generator/3154_namespaced_constant_resolving.phpt @@ -30,7 +30,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( Issue3154::class, true, - true, [], 'Issue3154Mock', true, @@ -45,7 +44,6 @@ class Issue3154Mock extends Is\Namespaced\Issue3154 implements PHPUnit\Framework { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/3967.phpt b/tests/end-to-end/mock-objects/generator/3967.phpt index 6fd70547006..3cf4957a450 100644 --- a/tests/end-to-end/mock-objects/generator/3967.phpt +++ b/tests/end-to-end/mock-objects/generator/3967.phpt @@ -18,7 +18,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Baz', true, - true, [], 'MockBaz', true, @@ -33,7 +32,6 @@ class MockBaz extends Exception implements Baz, PHPUnit\Framework\MockObject\Moc { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\ProxiedCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/397.phpt b/tests/end-to-end/mock-objects/generator/397.phpt index fa8bee2eccf..e74316946f9 100644 --- a/tests/end-to-end/mock-objects/generator/397.phpt +++ b/tests/end-to-end/mock-objects/generator/397.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( C::class, true, - true, [], 'MockC', true, @@ -31,7 +30,6 @@ class MockC extends C implements PHPUnit\Framework\MockObject\MockObjectInternal { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/4139.phpt b/tests/end-to-end/mock-objects/generator/4139.phpt index 7531952fede..121b3c45c26 100644 --- a/tests/end-to-end/mock-objects/generator/4139.phpt +++ b/tests/end-to-end/mock-objects/generator/4139.phpt @@ -10,7 +10,7 @@ require_once __DIR__ . '/../../../bootstrap.php'; $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; -$mock = $generator->generate(InterfaceWithConstructor::class, true, true); +$mock = $generator->generate(InterfaceWithConstructor::class, true); print $mock->classCode(); --EXPECTF-- @@ -20,7 +20,6 @@ class %s implements PHPUnit\Framework\MockObject\MockObjectInternal, InterfaceWi { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/abstract_class.phpt b/tests/end-to-end/mock-objects/generator/abstract_class.phpt index f67666efb13..94b78bf5b36 100644 --- a/tests/end-to-end/mock-objects/generator/abstract_class.phpt +++ b/tests/end-to-end/mock-objects/generator/abstract_class.phpt @@ -20,7 +20,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -35,7 +34,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/class.phpt b/tests/end-to-end/mock-objects/generator/class.phpt index a7db76512eb..1a275cdf9fb 100644 --- a/tests/end-to-end/mock-objects/generator/class.phpt +++ b/tests/end-to-end/mock-objects/generator/class.phpt @@ -20,7 +20,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -35,7 +34,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/class_call_parent_clone.phpt b/tests/end-to-end/mock-objects/generator/class_call_parent_clone.phpt index bcabe9d2843..57e880f8dc2 100644 --- a/tests/end-to-end/mock-objects/generator/class_call_parent_clone.phpt +++ b/tests/end-to-end/mock-objects/generator/class_call_parent_clone.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true @@ -30,7 +29,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\ProxiedCloneMethod; } diff --git a/tests/end-to-end/mock-objects/generator/class_call_parent_constructor.phpt b/tests/end-to-end/mock-objects/generator/class_call_parent_constructor.phpt index 48d06d9a8cf..2253401671c 100644 --- a/tests/end-to-end/mock-objects/generator/class_call_parent_constructor.phpt +++ b/tests/end-to-end/mock-objects/generator/class_call_parent_constructor.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true @@ -30,7 +29,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; } diff --git a/tests/end-to-end/mock-objects/generator/class_dont_call_parent_clone.phpt b/tests/end-to-end/mock-objects/generator/class_dont_call_parent_clone.phpt index 46ca8c7724d..e46b5b97580 100644 --- a/tests/end-to-end/mock-objects/generator/class_dont_call_parent_clone.phpt +++ b/tests/end-to-end/mock-objects/generator/class_dont_call_parent_clone.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', false @@ -30,7 +29,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; } diff --git a/tests/end-to-end/mock-objects/generator/class_dont_call_parent_constructor.phpt b/tests/end-to-end/mock-objects/generator/class_dont_call_parent_constructor.phpt index 48d06d9a8cf..2253401671c 100644 --- a/tests/end-to-end/mock-objects/generator/class_dont_call_parent_constructor.phpt +++ b/tests/end-to-end/mock-objects/generator/class_dont_call_parent_constructor.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true @@ -30,7 +29,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; } diff --git a/tests/end-to-end/mock-objects/generator/class_implementing_interface_call_parent_constructor.phpt b/tests/end-to-end/mock-objects/generator/class_implementing_interface_call_parent_constructor.phpt index 9d1281cacc9..9f8b4d38183 100644 --- a/tests/end-to-end/mock-objects/generator/class_implementing_interface_call_parent_constructor.phpt +++ b/tests/end-to-end/mock-objects/generator/class_implementing_interface_call_parent_constructor.phpt @@ -21,7 +21,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true @@ -35,7 +34,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; } diff --git a/tests/end-to-end/mock-objects/generator/class_implementing_interface_dont_call_parent_constructor.phpt b/tests/end-to-end/mock-objects/generator/class_implementing_interface_dont_call_parent_constructor.phpt index 9d1281cacc9..9f8b4d38183 100644 --- a/tests/end-to-end/mock-objects/generator/class_implementing_interface_dont_call_parent_constructor.phpt +++ b/tests/end-to-end/mock-objects/generator/class_implementing_interface_dont_call_parent_constructor.phpt @@ -21,7 +21,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true @@ -35,7 +34,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; } diff --git a/tests/end-to-end/mock-objects/generator/class_nonexistent_method.phpt b/tests/end-to-end/mock-objects/generator/class_nonexistent_method.phpt index 47e567a8b5a..f7a9a3b13b8 100644 --- a/tests/end-to-end/mock-objects/generator/class_nonexistent_method.phpt +++ b/tests/end-to-end/mock-objects/generator/class_nonexistent_method.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, ['bar'], 'MockFoo', true, @@ -31,7 +30,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/class_partial.phpt b/tests/end-to-end/mock-objects/generator/class_partial.phpt index 2eb9648318e..06f48b530d8 100644 --- a/tests/end-to-end/mock-objects/generator/class_partial.phpt +++ b/tests/end-to-end/mock-objects/generator/class_partial.phpt @@ -20,7 +20,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, ['bar'], 'MockFoo', true, @@ -35,7 +34,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/class_with_deprecated_method.phpt b/tests/end-to-end/mock-objects/generator/class_with_deprecated_method.phpt index c1264eab4f3..fa77ff5429a 100644 --- a/tests/end-to-end/mock-objects/generator/class_with_deprecated_method.phpt +++ b/tests/end-to-end/mock-objects/generator/class_with_deprecated_method.phpt @@ -20,7 +20,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'ClassWithDeprecatedMethod', true, - true, [], 'MockFoo', TRUE, @@ -35,7 +34,6 @@ class MockFoo extends ClassWithDeprecatedMethod implements PHPUnit\Framework\Moc { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/class_with_final_method.phpt b/tests/end-to-end/mock-objects/generator/class_with_final_method.phpt index eb77a418efd..d605633f957 100644 --- a/tests/end-to-end/mock-objects/generator/class_with_final_method.phpt +++ b/tests/end-to-end/mock-objects/generator/class_with_final_method.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'ClassWithFinalMethod', true, - true, [], 'MockFoo', true, @@ -31,7 +30,6 @@ class MockFoo extends ClassWithFinalMethod implements PHPUnit\Framework\MockObje { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; } diff --git a/tests/end-to-end/mock-objects/generator/class_with_method_with_nullable_typehinted_variadic_arguments.phpt b/tests/end-to-end/mock-objects/generator/class_with_method_with_nullable_typehinted_variadic_arguments.phpt index 85c305e8bba..d29eae022e0 100644 --- a/tests/end-to-end/mock-objects/generator/class_with_method_with_nullable_typehinted_variadic_arguments.phpt +++ b/tests/end-to-end/mock-objects/generator/class_with_method_with_nullable_typehinted_variadic_arguments.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'ClassWithMethodWithNullableTypehintedVariadicArguments', true, - true, [], 'MockFoo', true, @@ -31,7 +30,6 @@ class MockFoo extends ClassWithMethodWithNullableTypehintedVariadicArguments imp { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/class_with_method_with_typehinted_variadic_arguments.phpt b/tests/end-to-end/mock-objects/generator/class_with_method_with_typehinted_variadic_arguments.phpt index ecc44d3ac84..c5465e8a991 100644 --- a/tests/end-to-end/mock-objects/generator/class_with_method_with_typehinted_variadic_arguments.phpt +++ b/tests/end-to-end/mock-objects/generator/class_with_method_with_typehinted_variadic_arguments.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'ClassWithMethodWithTypehintedVariadicArguments', true, - true, [], 'MockFoo', true, @@ -31,7 +30,6 @@ class MockFoo extends ClassWithMethodWithTypehintedVariadicArguments implements { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/class_with_method_with_variadic_arguments.phpt b/tests/end-to-end/mock-objects/generator/class_with_method_with_variadic_arguments.phpt index 0a91f98372d..d920af7c8ae 100644 --- a/tests/end-to-end/mock-objects/generator/class_with_method_with_variadic_arguments.phpt +++ b/tests/end-to-end/mock-objects/generator/class_with_method_with_variadic_arguments.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'ClassWithMethodWithVariadicArguments', true, - true, [], 'MockFoo', true, @@ -31,7 +30,6 @@ class MockFoo extends ClassWithMethodWithVariadicArguments implements PHPUnit\Fr { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/constant_as_parameter_default_value.phpt b/tests/end-to-end/mock-objects/generator/constant_as_parameter_default_value.phpt index c38bc79ed2c..cd6e11736b6 100644 --- a/tests/end-to-end/mock-objects/generator/constant_as_parameter_default_value.phpt +++ b/tests/end-to-end/mock-objects/generator/constant_as_parameter_default_value.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -31,7 +30,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/interface.phpt b/tests/end-to-end/mock-objects/generator/interface.phpt index a21eabd4805..d627bcbb5e4 100644 --- a/tests/end-to-end/mock-objects/generator/interface.phpt +++ b/tests/end-to-end/mock-objects/generator/interface.phpt @@ -14,7 +14,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -29,7 +28,6 @@ class MockFoo implements PHPUnit\Framework\MockObject\MockObjectInternal, Foo { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/invocation_object_clone_object.phpt b/tests/end-to-end/mock-objects/generator/invocation_object_clone_object.phpt index 91d566e23c2..fd78b768acf 100644 --- a/tests/end-to-end/mock-objects/generator/invocation_object_clone_object.phpt +++ b/tests/end-to-end/mock-objects/generator/invocation_object_clone_object.phpt @@ -20,7 +20,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -35,7 +34,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/namespaced_class.phpt b/tests/end-to-end/mock-objects/generator/namespaced_class.phpt index 5a7a005f65d..357696754bc 100644 --- a/tests/end-to-end/mock-objects/generator/namespaced_class.phpt +++ b/tests/end-to-end/mock-objects/generator/namespaced_class.phpt @@ -22,7 +22,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'NS\Foo', true, - true, [], 'MockFoo', true, @@ -37,7 +36,6 @@ class MockFoo extends NS\Foo implements PHPUnit\Framework\MockObject\MockObjectI { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/namespaced_class_call_parent_clone.phpt b/tests/end-to-end/mock-objects/generator/namespaced_class_call_parent_clone.phpt index 56c061bd5dc..36589afd1d8 100644 --- a/tests/end-to-end/mock-objects/generator/namespaced_class_call_parent_clone.phpt +++ b/tests/end-to-end/mock-objects/generator/namespaced_class_call_parent_clone.phpt @@ -18,7 +18,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'NS\Foo', true, - true, [], 'MockFoo', true @@ -32,7 +31,6 @@ class MockFoo extends NS\Foo implements PHPUnit\Framework\MockObject\MockObjectI { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\ProxiedCloneMethod; } diff --git a/tests/end-to-end/mock-objects/generator/namespaced_class_call_parent_constructor.phpt b/tests/end-to-end/mock-objects/generator/namespaced_class_call_parent_constructor.phpt index 5eae28b476e..22f6c53f2fe 100644 --- a/tests/end-to-end/mock-objects/generator/namespaced_class_call_parent_constructor.phpt +++ b/tests/end-to-end/mock-objects/generator/namespaced_class_call_parent_constructor.phpt @@ -18,7 +18,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'NS\Foo', true, - true, [], 'MockFoo', true @@ -32,7 +31,6 @@ class MockFoo extends NS\Foo implements PHPUnit\Framework\MockObject\MockObjectI { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; } diff --git a/tests/end-to-end/mock-objects/generator/namespaced_class_dont_call_parent_clone.phpt b/tests/end-to-end/mock-objects/generator/namespaced_class_dont_call_parent_clone.phpt index d76a158590e..a0ebad21b14 100644 --- a/tests/end-to-end/mock-objects/generator/namespaced_class_dont_call_parent_clone.phpt +++ b/tests/end-to-end/mock-objects/generator/namespaced_class_dont_call_parent_clone.phpt @@ -18,7 +18,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'NS\Foo', true, - true, [], 'MockFoo', false @@ -32,7 +31,6 @@ class MockFoo extends NS\Foo implements PHPUnit\Framework\MockObject\MockObjectI { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; } diff --git a/tests/end-to-end/mock-objects/generator/namespaced_class_dont_call_parent_constructor.phpt b/tests/end-to-end/mock-objects/generator/namespaced_class_dont_call_parent_constructor.phpt index 5eae28b476e..22f6c53f2fe 100644 --- a/tests/end-to-end/mock-objects/generator/namespaced_class_dont_call_parent_constructor.phpt +++ b/tests/end-to-end/mock-objects/generator/namespaced_class_dont_call_parent_constructor.phpt @@ -18,7 +18,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'NS\Foo', true, - true, [], 'MockFoo', true @@ -32,7 +31,6 @@ class MockFoo extends NS\Foo implements PHPUnit\Framework\MockObject\MockObjectI { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; } diff --git a/tests/end-to-end/mock-objects/generator/namespaced_class_implementing_interface_call_parent_constructor.phpt b/tests/end-to-end/mock-objects/generator/namespaced_class_implementing_interface_call_parent_constructor.phpt index 1d716858923..f50f71effbb 100644 --- a/tests/end-to-end/mock-objects/generator/namespaced_class_implementing_interface_call_parent_constructor.phpt +++ b/tests/end-to-end/mock-objects/generator/namespaced_class_implementing_interface_call_parent_constructor.phpt @@ -23,7 +23,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'NS\Foo', true, - true, [], 'MockFoo', true @@ -37,7 +36,6 @@ class MockFoo extends NS\Foo implements PHPUnit\Framework\MockObject\MockObjectI { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; } diff --git a/tests/end-to-end/mock-objects/generator/namespaced_class_implementing_interface_dont_call_parent_constructor.phpt b/tests/end-to-end/mock-objects/generator/namespaced_class_implementing_interface_dont_call_parent_constructor.phpt index 1d716858923..f50f71effbb 100644 --- a/tests/end-to-end/mock-objects/generator/namespaced_class_implementing_interface_dont_call_parent_constructor.phpt +++ b/tests/end-to-end/mock-objects/generator/namespaced_class_implementing_interface_dont_call_parent_constructor.phpt @@ -23,7 +23,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'NS\Foo', true, - true, [], 'MockFoo', true @@ -37,7 +36,6 @@ class MockFoo extends NS\Foo implements PHPUnit\Framework\MockObject\MockObjectI { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; } diff --git a/tests/end-to-end/mock-objects/generator/namespaced_class_partial.phpt b/tests/end-to-end/mock-objects/generator/namespaced_class_partial.phpt index 0687db90b0e..4df7cb68fca 100644 --- a/tests/end-to-end/mock-objects/generator/namespaced_class_partial.phpt +++ b/tests/end-to-end/mock-objects/generator/namespaced_class_partial.phpt @@ -22,7 +22,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'NS\Foo', true, - true, ['bar'], 'MockFoo', true, @@ -37,7 +36,6 @@ class MockFoo extends NS\Foo implements PHPUnit\Framework\MockObject\MockObjectI { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/namespaced_interface.phpt b/tests/end-to-end/mock-objects/generator/namespaced_interface.phpt index da47d78dc6f..28e6e75c254 100644 --- a/tests/end-to-end/mock-objects/generator/namespaced_interface.phpt +++ b/tests/end-to-end/mock-objects/generator/namespaced_interface.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'NS\Foo', true, - true, [], 'MockFoo', true, @@ -31,7 +30,6 @@ class MockFoo implements PHPUnit\Framework\MockObject\MockObjectInternal, NS\Foo { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/nonexistent_class.phpt b/tests/end-to-end/mock-objects/generator/nonexistent_class.phpt index c3589956d97..b0a68f7818f 100644 --- a/tests/end-to-end/mock-objects/generator/nonexistent_class.phpt +++ b/tests/end-to-end/mock-objects/generator/nonexistent_class.phpt @@ -9,7 +9,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'NonExistentClass', true, - true, [], 'MockFoo', true, @@ -28,7 +27,6 @@ class MockFoo extends NonExistentClass implements PHPUnit\Framework\MockObject\M { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; } diff --git a/tests/end-to-end/mock-objects/generator/nonexistent_class_with_namespace.phpt b/tests/end-to-end/mock-objects/generator/nonexistent_class_with_namespace.phpt index 481bbe8440f..79b5cc42539 100644 --- a/tests/end-to-end/mock-objects/generator/nonexistent_class_with_namespace.phpt +++ b/tests/end-to-end/mock-objects/generator/nonexistent_class_with_namespace.phpt @@ -9,7 +9,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'NS\Foo', true, - true, [], 'MockFoo', true, @@ -34,7 +33,6 @@ class MockFoo extends NS\Foo implements PHPUnit\Framework\MockObject\MockObjectI { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; } diff --git a/tests/end-to-end/mock-objects/generator/nonexistent_class_with_namespace_starting_with_separator.phpt b/tests/end-to-end/mock-objects/generator/nonexistent_class_with_namespace_starting_with_separator.phpt index 688be3c2f33..e9624dac139 100644 --- a/tests/end-to-end/mock-objects/generator/nonexistent_class_with_namespace_starting_with_separator.phpt +++ b/tests/end-to-end/mock-objects/generator/nonexistent_class_with_namespace_starting_with_separator.phpt @@ -9,7 +9,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( '\NS\Foo', true, - true, [], 'MockFoo', true, @@ -34,7 +33,6 @@ class MockFoo extends NS\Foo implements PHPUnit\Framework\MockObject\MockObjectI { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; } diff --git a/tests/end-to-end/mock-objects/generator/nullable_types.phpt b/tests/end-to-end/mock-objects/generator/nullable_types.phpt index b6c2b85f964..740fc2be11a 100644 --- a/tests/end-to-end/mock-objects/generator/nullable_types.phpt +++ b/tests/end-to-end/mock-objects/generator/nullable_types.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -31,7 +30,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/nullable_union_type_parameter.phpt b/tests/end-to-end/mock-objects/generator/nullable_union_type_parameter.phpt index be3a493774d..fc88520cb22 100644 --- a/tests/end-to-end/mock-objects/generator/nullable_union_type_parameter.phpt +++ b/tests/end-to-end/mock-objects/generator/nullable_union_type_parameter.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( Foo::class, true, - true, [], 'MockFoo', true, @@ -31,7 +30,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/nullable_union_type_return.phpt b/tests/end-to-end/mock-objects/generator/nullable_union_type_return.phpt index 086dfb43237..86006ca8458 100644 --- a/tests/end-to-end/mock-objects/generator/nullable_union_type_return.phpt +++ b/tests/end-to-end/mock-objects/generator/nullable_union_type_return.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( Foo::class, true, - true, [], 'MockFoo', true, @@ -31,7 +30,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/parameter_dnf.phpt b/tests/end-to-end/mock-objects/generator/parameter_dnf.phpt index e7a99728213..5d8693eb679 100644 --- a/tests/end-to-end/mock-objects/generator/parameter_dnf.phpt +++ b/tests/end-to-end/mock-objects/generator/parameter_dnf.phpt @@ -24,7 +24,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( Foo::class, true, - true, [], 'MockFoo', true, @@ -39,7 +38,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/parameter_false.phpt b/tests/end-to-end/mock-objects/generator/parameter_false.phpt index eaa0d8dd25b..c8ca116761b 100644 --- a/tests/end-to-end/mock-objects/generator/parameter_false.phpt +++ b/tests/end-to-end/mock-objects/generator/parameter_false.phpt @@ -14,7 +14,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -29,7 +28,6 @@ class MockFoo implements PHPUnit\Framework\MockObject\MockObjectInternal, Foo { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/parameter_intersection.phpt b/tests/end-to-end/mock-objects/generator/parameter_intersection.phpt index dd2b1868fba..031c6bcb8d4 100644 --- a/tests/end-to-end/mock-objects/generator/parameter_intersection.phpt +++ b/tests/end-to-end/mock-objects/generator/parameter_intersection.phpt @@ -24,7 +24,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( Foo::class, true, - true, [], 'MockFoo', true, @@ -39,7 +38,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/parameter_null.phpt b/tests/end-to-end/mock-objects/generator/parameter_null.phpt index 077b07b32bd..e678c7152d3 100644 --- a/tests/end-to-end/mock-objects/generator/parameter_null.phpt +++ b/tests/end-to-end/mock-objects/generator/parameter_null.phpt @@ -14,7 +14,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -29,7 +28,6 @@ class MockFoo implements PHPUnit\Framework\MockObject\MockObjectInternal, Foo { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/parameter_true.phpt b/tests/end-to-end/mock-objects/generator/parameter_true.phpt index 3dd01191b20..5f6cda289ed 100644 --- a/tests/end-to-end/mock-objects/generator/parameter_true.phpt +++ b/tests/end-to-end/mock-objects/generator/parameter_true.phpt @@ -14,7 +14,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -29,7 +28,6 @@ class MockFoo implements PHPUnit\Framework\MockObject\MockObjectInternal, Foo { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/parameter_union.phpt b/tests/end-to-end/mock-objects/generator/parameter_union.phpt index db987e08a36..7acd0f2d523 100644 --- a/tests/end-to-end/mock-objects/generator/parameter_union.phpt +++ b/tests/end-to-end/mock-objects/generator/parameter_union.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( Foo::class, true, - true, [], 'MockFoo', true, @@ -31,7 +30,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_closure.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_closure.phpt index 7b2249645ec..5ae194dcd2a 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_closure.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_closure.phpt @@ -14,7 +14,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -29,7 +28,6 @@ class MockFoo implements PHPUnit\Framework\MockObject\MockObjectInternal, Foo { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_dnf.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_dnf.phpt index 26df3b6785b..4aeb4d6a115 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_dnf.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_dnf.phpt @@ -24,7 +24,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( Foo::class, true, - true, [], 'MockFoo', true, @@ -39,7 +38,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_false.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_false.phpt index df00673e31d..2a843d64080 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_false.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_false.phpt @@ -14,7 +14,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -29,7 +28,6 @@ class MockFoo implements PHPUnit\Framework\MockObject\MockObjectInternal, Foo { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_final.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_final.phpt index 2eac831b079..9f0a52bdecf 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_final.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_final.phpt @@ -21,7 +21,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -36,7 +35,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_generator.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_generator.phpt index d1a6941a294..cb3fde5ded2 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_generator.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_generator.phpt @@ -14,7 +14,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -29,7 +28,6 @@ class MockFoo implements PHPUnit\Framework\MockObject\MockObjectInternal, Foo { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_generator_empty_by_default.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_generator_empty_by_default.phpt index 759884bea6c..d2d35267a31 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_generator_empty_by_default.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_generator_empty_by_default.phpt @@ -17,7 +17,7 @@ require_once __DIR__ . '/../../../bootstrap.php'; $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; -$mock = $generator->testDouble('Foo', false, false); +$mock = $generator->testDouble('Foo', false); var_dump(iterator_to_array($mock->forTraversable())); var_dump(iterator_to_array($mock->forGenerator())); diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_intersection.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_intersection.phpt index 94ab5261b31..c8c0195f6fa 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_intersection.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_intersection.phpt @@ -24,7 +24,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( Foo::class, true, - true, [], 'MockFoo', true, @@ -39,7 +38,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_never.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_never.phpt index 9e8504a869e..00834af8b4a 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_never.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_never.phpt @@ -14,7 +14,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -29,7 +28,6 @@ class MockFoo implements PHPUnit\Framework\MockObject\MockObjectInternal, Foo { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_null.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_null.phpt index 792f31e35fb..21fa56f7e1a 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_null.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_null.phpt @@ -14,7 +14,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -29,7 +28,6 @@ class MockFoo implements PHPUnit\Framework\MockObject\MockObjectInternal, Foo { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_nullable.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_nullable.phpt index 1d6c9413cb9..71092c74d8c 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_nullable.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_nullable.phpt @@ -14,7 +14,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -29,7 +28,6 @@ class MockFoo implements PHPUnit\Framework\MockObject\MockObjectInternal, Foo { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_object_method.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_object_method.phpt index 7a8a6c8849d..c2d651683bf 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_object_method.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_object_method.phpt @@ -17,7 +17,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -32,7 +31,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_parent.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_parent.phpt index be2bb923d43..5f2ea874594 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_parent.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_parent.phpt @@ -21,7 +21,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Bar', true, - true, [], 'MockBar', true, @@ -36,7 +35,6 @@ class MockBar extends Bar implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_self.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_self.phpt index c30951a6163..9e41b4db697 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_self.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_self.phpt @@ -14,7 +14,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -29,7 +28,6 @@ class MockFoo implements PHPUnit\Framework\MockObject\MockObjectInternal, Foo { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_static.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_static.phpt index 276184397e8..252c58a7a5d 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_static.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_static.phpt @@ -24,7 +24,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'ClassWithStaticReturnTypes', true, - true, [], 'MockClassWithStaticReturnTypes', true, @@ -39,7 +38,6 @@ class MockClassWithStaticReturnTypes extends ClassWithStaticReturnTypes implemen { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_static_method.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_static_method.phpt index 0ff838193b1..ae027728ceb 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_static_method.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_static_method.phpt @@ -17,7 +17,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -32,7 +31,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_true.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_true.phpt index d5fd5080366..b82e61f7a33 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_true.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_true.phpt @@ -14,7 +14,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -29,7 +28,6 @@ class MockFoo implements PHPUnit\Framework\MockObject\MockObjectInternal, Foo { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_union.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_union.phpt index 74a649a27d8..a83ccd4eb7b 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_union.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_union.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( Foo::class, true, - true, [], 'MockFoo', true, @@ -31,7 +30,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/return_type_declarations_void.phpt b/tests/end-to-end/mock-objects/generator/return_type_declarations_void.phpt index 71de8d8d09f..8840e103d83 100644 --- a/tests/end-to-end/mock-objects/generator/return_type_declarations_void.phpt +++ b/tests/end-to-end/mock-objects/generator/return_type_declarations_void.phpt @@ -14,7 +14,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -29,7 +28,6 @@ class MockFoo implements PHPUnit\Framework\MockObject\MockObjectInternal, Foo { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/end-to-end/mock-objects/generator/scalar_type_declarations.phpt b/tests/end-to-end/mock-objects/generator/scalar_type_declarations.phpt index 70041a4eae4..2a16e9caf6f 100644 --- a/tests/end-to-end/mock-objects/generator/scalar_type_declarations.phpt +++ b/tests/end-to-end/mock-objects/generator/scalar_type_declarations.phpt @@ -16,7 +16,6 @@ $generator = new \PHPUnit\Framework\MockObject\Generator\Generator; $mock = $generator->generate( 'Foo', true, - true, [], 'MockFoo', true, @@ -31,7 +30,6 @@ class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObjectInte { use PHPUnit\Framework\MockObject\%SStubApi; use PHPUnit\Framework\MockObject\MockObjectApi; - use PHPUnit\Framework\MockObject\GeneratedAsMockObject; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\DoubledCloneMethod; diff --git a/tests/unit/Framework/MockObject/MockObjectTest.php b/tests/unit/Framework/MockObject/MockObjectTest.php index 14a16b33957..48c41ebabc3 100644 --- a/tests/unit/Framework/MockObject/MockObjectTest.php +++ b/tests/unit/Framework/MockObject/MockObjectTest.php @@ -12,7 +12,6 @@ use function call_user_func_array; use PHPUnit\Framework\Attributes\DoesNotPerformAssertions; use PHPUnit\Framework\Attributes\Group; -use PHPUnit\Framework\Attributes\IgnorePhpunitDeprecations; use PHPUnit\Framework\Attributes\Medium; use PHPUnit\Framework\Attributes\TestDox; use PHPUnit\Framework\ExpectationFailedException; @@ -420,16 +419,6 @@ public function testExpectationsCannotHaveDuplicateIds(): void $this->fail(); } - #[IgnorePhpunitDeprecations] - public function testExpectationsCanBeConfiguredOnTestStubs(): void - { - $mock = $this->createStub(AnInterface::class); - - $mock->expects($this->never())->method('doSomething'); - - $this->assertTrue(true); - } - public function testWillReturnCallbackWithVariadicVariables(): void { $mock = $this->createMock(MethodWIthVariadicVariables::class);