From ac25355a340c05131a8a8ad9b2484a2a101d53ca Mon Sep 17 00:00:00 2001 From: Art4 Date: Thu, 26 Oct 2023 14:02:39 +0200 Subject: [PATCH] Add comments about BC classes --- tests/BC/AccessableTest.php | 7 +++++-- tests/BC/ElementTest.php | 7 +++++-- tests/BC/Exception/ExceptionTest.php | 7 +++++-- tests/BC/FactoryTest.php | 7 +++++-- tests/BC/Input/InputTest.php | 7 +++++-- tests/BC/Input/RequestInputTest.php | 7 +++++-- tests/BC/ManagerTest.php | 7 +++++-- tests/BC/Serializer/SerializerTest.php | 7 +++++-- 8 files changed, 40 insertions(+), 16 deletions(-) diff --git a/tests/BC/AccessableTest.php b/tests/BC/AccessableTest.php index 7ee74b8..2a0d12c 100644 --- a/tests/BC/AccessableTest.php +++ b/tests/BC/AccessableTest.php @@ -15,11 +15,14 @@ class AccessableTest extends TestCase { /** * This test will test a custom implementation of the Accessable interface. - * DO NOT CHANGE THIS! - * Changes are only allowed by increasing the major version number. */ public function testBcForAccessableInterface(): void { + /** + * DO NOT CHANGE THIS CLASS! + * + * This anonymous class represents an implementation in user code + */ $class = new class () implements Accessable { /** * Get a value by a key diff --git a/tests/BC/ElementTest.php b/tests/BC/ElementTest.php index 73c28e3..c48e5ca 100644 --- a/tests/BC/ElementTest.php +++ b/tests/BC/ElementTest.php @@ -17,8 +17,6 @@ class ElementTest extends TestCase { /** * This test will test a custom implementation of the Element interface. - * DO NOT CHANGE THIS! - * Changes are only allowed by increasing the major version number. */ public function testBcForElementInterface(): void { @@ -26,6 +24,11 @@ public function testBcForElementInterface(): void $manager = $this->createMock(Manager::class); $parent = $this->createMock(Accessable::class); + /** + * DO NOT CHANGE THIS CLASS! + * + * This anonymous class represents an implementation in user code + */ $class = new class ($data, $manager, $parent) implements Element { /** * Sets the manager and parent diff --git a/tests/BC/Exception/ExceptionTest.php b/tests/BC/Exception/ExceptionTest.php index c84d828..495427c 100644 --- a/tests/BC/Exception/ExceptionTest.php +++ b/tests/BC/Exception/ExceptionTest.php @@ -15,11 +15,14 @@ class ExceptionTest extends TestCase { /** * This test will test a custom implementation of the Exception interface. - * DO NOT CHANGE THIS! - * Changes are only allowed by increasing the major version number. */ public function testBcForExceptionInterface(): void { + /** + * DO NOT CHANGE THIS CLASS! + * + * This anonymous class represents an implementation in user code + */ $class = new class () implements Exception {}; $this->assertInstanceOf(Exception::class, $class); diff --git a/tests/BC/FactoryTest.php b/tests/BC/FactoryTest.php index beb1ecd..253983f 100644 --- a/tests/BC/FactoryTest.php +++ b/tests/BC/FactoryTest.php @@ -15,11 +15,14 @@ class FactoryTest extends TestCase { /** * This test will test a custom implementation of the Factory interface. - * DO NOT CHANGE THIS! - * Changes are only allowed by increasing the major version number. */ public function testBcForFactoryInterface(): void { + /** + * DO NOT CHANGE THIS CLASS! + * + * This anonymous class represents an implementation in user code + */ $class = new class () implements Factory { /** * Create a new instance of a class diff --git a/tests/BC/Input/InputTest.php b/tests/BC/Input/InputTest.php index 1e0d0c7..16664cb 100644 --- a/tests/BC/Input/InputTest.php +++ b/tests/BC/Input/InputTest.php @@ -15,11 +15,14 @@ class InputTest extends TestCase { /** * This test will test a custom implementation of the Input interface. - * DO NOT CHANGE THIS! - * Changes are only allowed by increasing the major version number. */ public function testBcForInputInterface(): void { + /** + * DO NOT CHANGE THIS CLASS! + * + * This anonymous class represents an implementation in user code + */ $class = new class () implements Input { /** * Get the input as simple object diff --git a/tests/BC/Input/RequestInputTest.php b/tests/BC/Input/RequestInputTest.php index c52b939..ffc76b9 100644 --- a/tests/BC/Input/RequestInputTest.php +++ b/tests/BC/Input/RequestInputTest.php @@ -15,11 +15,14 @@ class RequestInputTest extends TestCase { /** * This test will test a custom implementation of the RequestInput interface. - * DO NOT CHANGE THIS! - * Changes are only allowed by increasing the major version number. */ public function testBcForRequestInputInterface(): void { + /** + * DO NOT CHANGE THIS CLASS! + * + * This anonymous class represents an implementation in user code + */ $class = new class () implements RequestInput {}; $this->assertInstanceOf(RequestInput::class, $class); diff --git a/tests/BC/ManagerTest.php b/tests/BC/ManagerTest.php index 34005a8..573dfd1 100644 --- a/tests/BC/ManagerTest.php +++ b/tests/BC/ManagerTest.php @@ -16,11 +16,14 @@ class ManagerTest extends TestCase { /** * This test will test a custom implementation of the Manager interface. - * DO NOT CHANGE THIS! - * Changes are only allowed by increasing the major version number. */ public function testBcForManagerInterface(): void { + /** + * DO NOT CHANGE THIS CLASS! + * + * This anonymous class represents an implementation in user code + */ $class = new class () implements Manager { /** * Parse the input diff --git a/tests/BC/Serializer/SerializerTest.php b/tests/BC/Serializer/SerializerTest.php index 6ce99fd..ee82bca 100644 --- a/tests/BC/Serializer/SerializerTest.php +++ b/tests/BC/Serializer/SerializerTest.php @@ -16,11 +16,14 @@ class SerializerTest extends TestCase { /** * This test will test a custom implementation of the Serializer interface. - * DO NOT CHANGE THIS! - * Changes are only allowed by increasing the major version number. */ public function testBcForSerializerInterface(): void { + /** + * DO NOT CHANGE THIS CLASS! + * + * This anonymous class represents an implementation in user code + */ $class = new class () implements Serializer { /** * Serialize data