Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Test/Integration/CheckDefaultStoreCodeHiddenInUrlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace CustomGento\DefaultStoreCodeRemover\Test\Integration;

use Magento\Store\Api\StoreRepositoryInterface;
use Magento\Store\Model\Store;
use Magento\TestFramework\Helper\Bootstrap;
use Magento\TestFramework\TestCase\AbstractController;

Expand All @@ -31,6 +32,7 @@ protected function setUp(): void
public function testStoreCodeIsShownInNonDefaultStoreUrl(): void
{
$store = $this->storeRepository->get('test');
self::assertInstanceOf(Store::class, $store);
$this->assertStringContainsString('test', $store->getBaseUrl());
}

Expand All @@ -42,6 +44,7 @@ public function testStoreCodeIsShownInNonDefaultStoreUrl(): void
public function testStoreCodeIsNotShownInNonDefaultStoreUrl(): void
{
$store = $this->storeRepository->get('test');
self::assertInstanceOf(Store::class, $store);
$this->assertStringNotContainsString('test', $store->getBaseUrl());
}

Expand All @@ -52,6 +55,7 @@ public function testStoreCodeIsNotShownInNonDefaultStoreUrl(): void
public function testStoreCodeIsNotShownInDefaultStoreUrl(): void
{
$store = $this->storeRepository->get('default');
self::assertInstanceOf(Store::class, $store);
$this->assertStringNotContainsString('default', $store->getBaseUrl());
}

Expand All @@ -62,6 +66,7 @@ public function testStoreCodeIsNotShownInDefaultStoreUrl(): void
public function testStoreCodeIsShownInDefaultStoreUrl(): void
{
$store = $this->storeRepository->get('default');
self::assertInstanceOf(Store::class, $store);
$this->assertStringNotContainsString('default', $store->getBaseUrl());
}
}
8 changes: 0 additions & 8 deletions Test/Integration/ModuleConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

namespace CustomGento\DefaultStoreCodeRemover\Test\Integration;

use Magento\Framework\App\ObjectManager as AppObjectManager;
use Magento\Framework\Component\ComponentRegistrar;
use Magento\TestFramework\ObjectManager as TestFrameworkObjectManager;
use PHPUnit\Framework\TestCase;

/**
Expand All @@ -19,15 +17,9 @@ class ModuleConfigTest extends TestCase
*/
private $subjectModuleName;

/**
* @var AppObjectManager
*/
private $objectManager;

protected function setUp(): void
{
$this->subjectModuleName = 'CustomGento_DefaultStoreCodeRemover';
$this->objectManager = TestFrameworkObjectManager::getInstance();
}

public function testTheModuleIsRegistered(): void
Expand Down
Loading