Skip to content

Commit

Permalink
Add comments about BC classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Art4 committed Oct 26, 2023
1 parent 11ce078 commit ac25355
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 16 deletions.
7 changes: 5 additions & 2 deletions tests/BC/AccessableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions tests/BC/ElementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@ 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
{
$data = null;
$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
Expand Down
7 changes: 5 additions & 2 deletions tests/BC/Exception/ExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 5 additions & 2 deletions tests/BC/FactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions tests/BC/Input/InputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions tests/BC/Input/RequestInputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 5 additions & 2 deletions tests/BC/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions tests/BC/Serializer/SerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ac25355

Please sign in to comment.