Skip to content

Commit

Permalink
OXDEV-8213: Remove createTheme functionality to public class
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelOxid committed Jul 16, 2024
1 parent 69f90a9 commit 80af152
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 51 deletions.
5 changes: 0 additions & 5 deletions src/Theme/Infrastructure/CoreThemeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ class CoreThemeFactory implements CoreThemeFactoryInterface
* @inheritDoc
*/
public function create(): Theme
{
return $this->createTheme();
}

protected function createTheme(): Theme
{
return oxNew(Theme::class);
}
Expand Down
30 changes: 30 additions & 0 deletions tests/Integration/Infrastructure/CoreThemeFactoryTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

/**
* Copyright © OXID eSales AG. All rights reserved.
* See LICENSE file for license details.
*/

declare(strict_types=1);

namespace OxidEsales\GraphQL\ConfigurationAccess\Tests\Integration\Infrastructure;

use OxidEsales\Eshop\Core\Theme;
use OxidEsales\EshopCommunity\Tests\Integration\IntegrationTestCase;
use OxidEsales\GraphQL\ConfigurationAccess\Theme\Infrastructure\CoreThemeFactory;

/**
* @covers \OxidEsales\GraphQL\ConfigurationAccess\Theme\Infrastructure\CoreThemeFactory
*/
class CoreThemeFactoryTest extends IntegrationTestCase
{
public function testCreate()
{
$coreThemeFactory = new CoreThemeFactory();
$theme = $coreThemeFactory->create();
$this->assertEquals(new Theme(), $theme);

$anotherTheme = $coreThemeFactory->create();
$this->assertNotEquals($theme, $anotherTheme);
}
}
46 changes: 0 additions & 46 deletions tests/Unit/Theme/Infrastructure/CoreThemeFactoryTest.php

This file was deleted.

0 comments on commit 80af152

Please sign in to comment.