Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AshrafOxid committed Mar 15, 2024
1 parent d531374 commit e4b707c
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions tests/Unit/TwigEngineConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

namespace OxidEsales\Twig\Tests\Unit;

use OxidEsales\EshopCommunity\Internal\Framework\Templating\Cache\ShopTemplateCacheServiceInterface;
use OxidEsales\EshopCommunity\Internal\Transition\Utility\ContextInterface;
use OxidEsales\Twig\TwigContextInterface;
use OxidEsales\Twig\TwigEngineConfiguration;
Expand All @@ -20,13 +21,25 @@ public function testGetParameters(): void
{
$context = $this->createConfiguredMock(
ContextInterface::class,
['getTemplateCacheDirectory' => 'dummy_cache_dir']
[
'getTemplateCacheDirectory' => 'dummy_cache_dir',
'getCurrentShopId' => 1
]
);
$twigContext = $this->createConfiguredMock(
TwigContextInterface::class,
['getIsDebug' => true]
);
$engineConfiguration = new TwigEngineConfiguration($context, $twigContext, false);
$twigTemplateCacheService = $this->createConfiguredMock(
ShopTemplateCacheServiceInterface::class,
['getCacheDirectory' => 'dummy_cache_dir']
);
$engineConfiguration = new TwigEngineConfiguration(
$context,
$twigContext,
false,
$twigTemplateCacheService
);

$parameters = $engineConfiguration->getParameters();

Expand Down

0 comments on commit e4b707c

Please sign in to comment.