Skip to content
Snippets Groups Projects
Commit ac601c75 authored by Nikita Hovratov's avatar Nikita Hovratov Committed by Christian Kuhn
Browse files

[TASK] Replace prophecy in EXT:core SiteConfigurationTest

Resolves: #98750
Releases: main
Change-Id: I3d57299abd943eca8f2e12a3ad56461e7339c28f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76563


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent a6d223be
Branches
Tags
No related merge requests found
......@@ -17,22 +17,18 @@ declare(strict_types=1);
namespace TYPO3\CMS\Core\Tests\Unit\Configuration;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Psr\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Yaml\Yaml;
use TYPO3\CMS\Core\Cache\Frontend\PhpFrontend;
use TYPO3\CMS\Core\Cache\Frontend\NullFrontend;
use TYPO3\CMS\Core\Configuration\Loader\YamlFileLoader;
use TYPO3\CMS\Core\Configuration\SiteConfiguration;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Http\Uri;
use TYPO3\CMS\Core\Tests\Unit\Fixtures\EventDispatcher\NoopEventDispatcher;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
class SiteConfigurationTest extends UnitTestCase
{
use ProphecyTrait;
protected bool $resetSingletonInstances = true;
protected ?SiteConfiguration $siteConfiguration;
......@@ -52,17 +48,10 @@ class SiteConfigurationTest extends UnitTestCase
GeneralUtility::mkdir_deep($this->fixturePath);
}
$this->testFilesToDelete[] = $basePath;
$coreCacheProphecy = $this->prophesize(PhpFrontend::class);
$coreCacheProphecy->require(Argument::any())->willReturn(false);
$coreCacheProphecy->set(Argument::any(), Argument::any())->willReturn(null);
$coreCacheProphecy->remove(Argument::any(), Argument::any())->willReturn(null);
$eventDispatcher = $this->prophesize(EventDispatcherInterface::class);
$eventDispatcher->dispatch(Argument::cetera())->willReturnArgument(0);
$this->siteConfiguration = new SiteConfiguration(
$this->fixturePath,
$eventDispatcher->reveal(),
$coreCacheProphecy->reveal()
new NoopEventDispatcher(),
new NullFrontend('test')
);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment