From dedf74e4e181e3b8a73c5577c3f0023daca4f0c1 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 | 25 ------------------- .../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(+), 225 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 c079962b98a..77fb04a3099 100644 --- a/src/Framework/MockObject/Generator/Generator.php +++ b/src/Framework/MockObject/Generator/Generator.php @@ -34,8 +34,6 @@ use IteratorAggregate; use PHPUnit\Framework\MockObject\ConfigurableMethod; use PHPUnit\Framework\MockObject\DoubledCloneMethod; -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; @@ -90,7 +88,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; @@ -103,7 +101,6 @@ public function testDouble(string $type, bool $mockObject, bool $markAsMockObjec $mock = $this->generate( $type, $mockObject, - $markAsMockObject, $methods, $mockClassName, $callOriginalClone, @@ -188,7 +185,6 @@ public function testDoubleForInterfaceIntersection(array $interfaces, bool $mock return $this->testDouble( $intersectionName, $mockObject, - $mockObject, returnValueGeneration: $returnValueGeneration, ); } @@ -204,13 +200,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, @@ -220,7 +215,6 @@ public function generate(string $type, bool $mockObject, bool $markAsMockObject, $key = md5( $type . ($mockObject ? 'MockObject' : 'TestStub') . - ($markAsMockObject ? 'MockObject' : 'TestStub') . serialize($methods) . serialize($callOriginalClone), ); @@ -229,7 +223,6 @@ public function generate(string $type, bool $mockObject, bool $markAsMockObject, self::$cache[$key] = $this->generateCodeForTestDoubleClass( $type, $mockObject, - $markAsMockObject, $methods, $mockClassName, $callOriginalClone, @@ -305,7 +298,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 = []; @@ -462,12 +455,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 af97379f94c..938badafabb 100644 --- a/src/Framework/MockObject/MockBuilder.php +++ b/src/Framework/MockObject/MockBuilder.php @@ -86,7 +86,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 3086d1feced..c57a36c3d16 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,27 +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 (!isset(self::$__phpunit_deprecation_emitted_for_test[$test->id()])) { - EventFacade::emitter()->testTriggeredPhpunitDeprecation( - $test, - $message, - ); - - self::$__phpunit_deprecation_emitted_for_test[$test->id()] = true; - } - } catch (NoTestCaseObjectOnCallStackException) { - EventFacade::emitter()->testRunnerTriggeredDeprecation($message); - } - } - 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 10445265ada..79cc6a27970 100644 --- a/src/Framework/MockObject/Runtime/Interface/StubInternal.php +++ b/src/Framework/MockObject/Runtime/Interface/StubInternal.php @@ -21,6 +21,4 @@ public function __phpunit_getInvocationHandler(): InvocationHandler; public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration): void; 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 1688cd1e178..8ae64c9b1f8 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 ebe9e7062b4..e2b8eb4fc1f 100644 --- a/src/Framework/TestCase.php +++ b/src/Framework/TestCase.php @@ -1189,7 +1189,6 @@ final protected function createMock(string $originalClassName): MockObject $mock = (new MockGenerator)->testDouble( $originalClassName, true, - true, callOriginalConstructor: false, callOriginalClone: false, returnValueGeneration: self::generateReturnValuesForTestDoubles(), @@ -2181,7 +2180,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 3101caac7e9..5ad62c7ca8b 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\StubApi; 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 935a5767586..f1978687ad6 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\StubApi; 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 1c1944f6def..c62df684ac2 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\StubApi; 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 d7cf79613fc..cde3b1a2e1e 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\StubApi; 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 26fb65fc1c3..3c04a393a5e 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\StubApi; 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 47bdf9ee8fb..d66fcd003a5 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\StubApi; 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 0de441ca70c..d739c2f22a6 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\StubApi; 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 21c6e32bf48..265d7544b22 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\StubApi; 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 1b9a017a478..560f99de34d 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\StubApi; 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 f42a165b7db..be28c3ca065 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\StubApi; 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 1b9a017a478..560f99de34d 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\StubApi; 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 8ec3ad96886..19a3c3290d3 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\StubApi; 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 8ec3ad96886..19a3c3290d3 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\StubApi; 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 85478cf0714..439636b9ad1 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\StubApi; 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 4dec2ae3f6d..56692f6fa92 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\StubApi; 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 42972a264f3..b6af4478d67 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\StubApi; 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 ed0763c0258..761fc00662a 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\StubApi; 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 5015becb0df..e435c22e6f0 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\StubApi; 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 3473f67220a..b81a0e31e8b 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\StubApi; 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 35a7868663d..622eea315c0 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\StubApi; 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 2defc681f7f..ab6a0d1166f 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\StubApi; 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 cd5e5e879f2..e94a23d737a 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\StubApi; 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 eafa20efbe5..176ca01b9ba 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\StubApi; 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 45be140eec5..874705264cf 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\StubApi; 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 59286197333..16fc592f66a 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\StubApi; 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 11ade685327..cfcc72219bd 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\StubApi; 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 f503112da54..1c518c83ffa 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\StubApi; 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 11ade685327..cfcc72219bd 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\StubApi; 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 840f7733d34..7112355589d 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\StubApi; 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 840f7733d34..7112355589d 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\StubApi; 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 c6c7031331e..674d8ed1f67 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\StubApi; 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 1e683636913..a776bcb260a 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\StubApi; 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 a674e6697b8..4dc782bc682 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\StubApi; 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 4c981d9b713..f18c51ea402 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\StubApi; 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 0a31e9fc572..6770d55960f 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\StubApi; 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 e757f2117f9..0312c5582b7 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\StubApi; 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 90f8edd0155..a8229213686 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\StubApi; 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 222bf8a1b14..e30df8de1dc 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\StubApi; 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 366f33edfbc..6cc53484e25 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\StubApi; 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 6639eeeaf20..1c2e034f8b9 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\StubApi; 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 c43cb7952a4..82f6836ced1 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\StubApi; 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 c5808894c29..fed7c177bb1 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\StubApi; 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 f6daf0f3e53..8830c21f4f0 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\StubApi; 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 ceb46ece11a..0a21ff94243 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\StubApi; 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 4811781541c..874b497b84c 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\StubApi; 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 b4845c28b2a..ee97840fa65 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\StubApi; 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 b184235450d..23875fe06df 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\StubApi; 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 ae6e6dc80e0..c87efe46bae 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\StubApi; 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 5789d59ab60..e416665d8e0 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\StubApi; 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 489361b3ff6..9786f3faca1 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\StubApi; 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 ab8af719eaa..21f27d8aa72 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\StubApi; 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 0ffeb9865ed..a2f50a1f095 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\StubApi; 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 422bda60014..982d394d49f 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\StubApi; 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 7de1f054fb9..1535858d0ae 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\StubApi; 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 6d1bd401b7e..d49b1b8234a 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\StubApi; 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 b003266ab0a..3f11eca170d 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\StubApi; 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 061736c0aea..1872a1438ca 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\StubApi; 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 156026a34e7..0311ecee4d2 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\StubApi; 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 8677dec9b3b..db7a5ba7367 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\StubApi; 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 a8b38120064..1c7e9491ce1 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\StubApi; 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 a018b9a3900..f972f2c1f32 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\StubApi; 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 1d6d7263855..5363badf8d4 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\StubApi; 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);