Skip to content

Commit

Permalink
Merge pull request #42 from TYPO3GmbH/typo3-testing-framework-7.x
Browse files Browse the repository at this point in the history
[TASK] Update typo3/testing-framework (^6.0 => ^7.0)
  • Loading branch information
mbrodala authored Mar 25, 2024
2 parents b4453f8 + 49aef5b commit 9b762cc
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
25 changes: 25 additions & 0 deletions Tests/Functional/DataHandling/PermissiveActionService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);

/*
* This file is part of the package t3g/file_variants.
*
* For the full copyright and license information, please read the
* LICENSE file that was distributed with this source code.
*/

namespace T3G\AgencyPack\FileVariants\Tests\Functional\DataHandling;

use TYPO3\CMS\Core\DataHandling\DataHandler;
use TYPO3\TestingFramework\Core\Functional\Framework\DataHandling\ActionService;

final class PermissiveActionService extends ActionService
{
protected function createDataHandler(): DataHandler
{
$dataHandler = parent::createDataHandler();
$dataHandler->bypassAccessCheckForRecords = true;

return $dataHandler;
}
}
9 changes: 6 additions & 3 deletions Tests/Functional/FunctionalTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
*
* The TYPO3 project - inspiring people to share!
*/
use Prophecy\PhpUnit\ProphecyTrait;
use T3G\AgencyPack\FileVariants\Tests\Functional\DataHandling\PermissiveActionService;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Core\Bootstrap;
use TYPO3\CMS\Core\Core\Environment;
Expand All @@ -37,6 +39,7 @@
*/
abstract class FunctionalTestCase extends \TYPO3\TestingFramework\Core\Functional\FunctionalTestCase
{
use ProphecyTrait;

/**
* @var string
Expand All @@ -57,7 +60,7 @@ abstract class FunctionalTestCase extends \TYPO3\TestingFramework\Core\Functiona
*/
protected $backendUser;
/**
* @var ActionService
* @var PermissiveActionService
*/
protected $actionService;

Expand All @@ -66,7 +69,7 @@ abstract class FunctionalTestCase extends \TYPO3\TestingFramework\Core\Functiona
*
* @var non-empty-string
*/
protected $backendUserFixture = 'PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/be_users.xml';
protected string $backendUserFixture = 'PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/be_users.xml';

protected function setUp(): void
{
Expand All @@ -93,7 +96,7 @@ protected function setUp(): void
$fileMetadataPermissionAspect->reveal()
);

$this->actionService = new ActionService();
$this->actionService = new PermissiveActionService();

// done to prevent an error during processing
// it makes no difference here whether file filters apply to the data set
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"saschaegerer/phpstan-typo3": "^1.10",
"ssch/typo3-rector": "^2.2",
"typo3/coding-standards": "^0.7.1",
"typo3/testing-framework": "^6.0"
"typo3/testing-framework": "^7.0"
},
"replace": {
"t3g/file_variants": "self.version"
Expand Down

0 comments on commit 9b762cc

Please sign in to comment.