Skip to content

Commit

Permalink
[BUGFIX] Move fixtures to associated test classes
Browse files Browse the repository at this point in the history
The "global" extbase/Tests/Fixtures folder is
unfortunate: Fixtures should be located in more
dedicated folders and should not be shareable
between unit and functional tests.

The patch moves a couple of fixtures to more
dedicated locations to avoid confusion.

Resolves: #101530
Releases: main, 12.4
Change-Id: I3faad97ca05e7790da8443d615309da03ff91201
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80457
Tested-by: core-ci <[email protected]>
Tested-by: Christian Kuhn <[email protected]>
Reviewed-by: Christian Kuhn <[email protected]>
  • Loading branch information
juergen-venne authored and lolli42 committed Aug 8, 2023
1 parent 94bc630 commit 0a06b14
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* The TYPO3 project - inspiring people to share!
*/

namespace TYPO3\CMS\Extbase\Tests\Fixture;
namespace TYPO3\CMS\Extbase\Tests\Functional\Property\Fixtures;

enum IntegerBackedEnum: int
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* The TYPO3 project - inspiring people to share!
*/

namespace TYPO3\CMS\Extbase\Tests\Fixture;
namespace TYPO3\CMS\Extbase\Tests\Functional\Property\Fixtures;

enum StringBackedEnum: string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* The TYPO3 project - inspiring people to share!
*/

namespace TYPO3\CMS\Extbase\Tests\Fixture;
namespace TYPO3\CMS\Extbase\Tests\Functional\Property\Fixtures;

enum UnbackedEnum
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
namespace TYPO3\CMS\Extbase\Tests\Functional\Property\TypeConverter;

use TYPO3\CMS\Extbase\Property\PropertyMapper;
use TYPO3\CMS\Extbase\Tests\Fixture\IntegerBackedEnum;
use TYPO3\CMS\Extbase\Tests\Fixture\StringBackedEnum;
use TYPO3\CMS\Extbase\Tests\Fixture\UnbackedEnum;
use TYPO3\CMS\Extbase\Tests\Functional\Property\Fixtures\IntegerBackedEnum;
use TYPO3\CMS\Extbase\Tests\Functional\Property\Fixtures\StringBackedEnum;
use TYPO3\CMS\Extbase\Tests\Functional\Property\Fixtures\UnbackedEnum;
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;

final class EnumConverterTest extends FunctionalTestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* The TYPO3 project - inspiring people to share!
*/

namespace TYPO3\CMS\Extbase\Tests\Fixture;
namespace TYPO3\CMS\Extbase\Tests\Functional\Validation\Fixtures;

use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
use TYPO3\CMS\Core\Localization\LanguageServiceFactory;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
use TYPO3\CMS\Extbase\Reflection\ReflectionService;
use TYPO3\CMS\Extbase\Tests\Fixture\Entity;
use TYPO3\CMS\Extbase\Tests\Functional\Validation\Fixtures\Entity;
use TYPO3\CMS\Extbase\Validation\Validator\AbstractGenericObjectValidator;
use TYPO3\CMS\Extbase\Validation\Validator\CollectionValidator;
use TYPO3\CMS\Extbase\Validation\Validator\EmailAddressValidator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
namespace TYPO3\CMS\Extbase\Tests\Unit\Utility;

use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
use TYPO3\CMS\Extbase\Tests\Fixture\DummyClass;
use TYPO3\CMS\Extbase\Tests\Unit\Utility\Fixtures\DebuggerUtilityAccessibleProxy;
use TYPO3\CMS\Extbase\Tests\Unit\Utility\Fixtures\DummyClass;
use TYPO3\CMS\Extbase\Utility\DebuggerUtility;
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;

Expand Down Expand Up @@ -154,7 +154,7 @@ public function varDumpShowsDumpOfClosureWithDummyClassParameterType(): void
$closure = (static function (DummyClass $class) {});

$result = DebuggerUtility::var_dump($closure, null, 8, true, false, true, [\stdClass::class]);
self::assertStringContainsString('function (TYPO3\CMS\Extbase\Tests\Fixture\DummyClass $class)', $result);
self::assertStringContainsString('function (TYPO3\CMS\Extbase\Tests\Unit\Utility\Fixtures\DummyClass $class)', $result);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* The TYPO3 project - inspiring people to share!
*/

namespace TYPO3\CMS\Extbase\Tests\Fixture;
namespace TYPO3\CMS\Extbase\Tests\Unit\Utility\Fixtures;

/**
* Dummy Class
Expand Down

0 comments on commit 0a06b14

Please sign in to comment.