-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Move the XClass tests to functional tests (#711)
- Loading branch information
1 parent
f9c1ec0
commit ce1f7c5
Showing
6 changed files
with
72 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OliverKlee\FeUserExtraFields\Tests\Functional\Domain\Model; | ||
|
||
use OliverKlee\FeUserExtraFields\Domain\Model\FrontendUserGroup; | ||
use OliverKlee\FeUserExtraFields\Tests\Functional\Domain\Model\Fixtures\XclassFrontendUserGroup; | ||
use TYPO3\CMS\Core\Utility\GeneralUtility; | ||
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; | ||
|
||
/** | ||
* @covers \OliverKlee\FeUserExtraFields\Domain\Model\FrontendUserGroup | ||
*/ | ||
final class FrontendUserGroupTest extends FunctionalTestCase | ||
{ | ||
protected bool $initializeDatabase = false; | ||
|
||
protected array $testExtensionsToLoad = ['oliverklee/feuserextrafields']; | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function canBeSubclassed(): void | ||
{ | ||
// @phpstan-ignore offsetAccess.nonOffsetAccessible, offsetAccess.nonOffsetAccessible | ||
$xclassConfiguration = &$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']; | ||
self::assertIsArray($xclassConfiguration); | ||
$xclassConfiguration[FrontendUserGroup::class] = ['className' => XclassFrontendUserGroup::class]; | ||
|
||
$instance = GeneralUtility::makeInstance(FrontendUserGroup::class); | ||
|
||
self::assertInstanceOf(XclassFrontendUserGroup::class, $instance); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OliverKlee\FeUserExtraFields\Tests\Functional\Domain\Model; | ||
|
||
use OliverKlee\FeUserExtraFields\Domain\Model\FrontendUser; | ||
use OliverKlee\FeUserExtraFields\Tests\Functional\Domain\Model\Fixtures\XclassFrontendUser; | ||
use TYPO3\CMS\Core\Utility\GeneralUtility; | ||
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; | ||
|
||
/** | ||
* @covers \OliverKlee\FeUserExtraFields\Domain\Model\FrontendUser | ||
*/ | ||
final class FrontendUserTest extends FunctionalTestCase | ||
{ | ||
protected bool $initializeDatabase = false; | ||
|
||
protected array $testExtensionsToLoad = ['oliverklee/feuserextrafields']; | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function canBeSubclassed(): void | ||
{ | ||
// @phpstan-ignore offsetAccess.nonOffsetAccessible, offsetAccess.nonOffsetAccessible | ||
$xclassConfiguration = &$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']; | ||
self::assertIsArray($xclassConfiguration); | ||
$xclassConfiguration[FrontendUser::class] = ['className' => XclassFrontendUser::class]; | ||
|
||
$instance = GeneralUtility::makeInstance(FrontendUser::class); | ||
|
||
self::assertInstanceOf(XclassFrontendUser::class, $instance); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters