-
Notifications
You must be signed in to change notification settings - Fork 656
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6141 from kurozumi/customize-bundle
CustomizeディレクトリからSymfony Bundleをインストールできるよう修正
- Loading branch information
Showing
4 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of EC-CUBE | ||
* | ||
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved. | ||
* | ||
* http://www.ec-cube.co.jp/ | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Eccube\Tests; | ||
|
||
use Customize\Bundle\CustomizeBundle; | ||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | ||
use Symfony\Component\Filesystem\Filesystem; | ||
|
||
class CustomizeBundleTest extends KernelTestCase | ||
{ | ||
public function tearDown(): void | ||
{ | ||
$fs = new Filesystem(); | ||
$fs->remove(__DIR__.'/../../../app/Customize/Bundle'); | ||
$fs->remove(__DIR__.'/../../../app/Customize/Resource/config/bundles.php'); | ||
|
||
parent::tearDown(); | ||
} | ||
|
||
public function testContainsCustomizeBundle() | ||
{ | ||
$fs = new Filesystem(); | ||
$originDir = __DIR__.'/../../Fixtures/Customize'; | ||
$targetDir = __DIR__.'/../../../app/Customize'; | ||
$fs->mirror($originDir, $targetDir); | ||
|
||
$kernel = static::bootKernel(); | ||
$bundleNames = []; | ||
foreach ($kernel->getBundles() as $bundle) { | ||
$bundleNames[] = get_class($bundle); | ||
} | ||
|
||
self::assertContains(CustomizeBundle::class, $bundleNames); | ||
} | ||
|
||
public function testNotContainsCustomizeBundle() | ||
{ | ||
$kernel = static::bootKernel(); | ||
$bundleNames = []; | ||
foreach ($kernel->getBundles() as $bundle) { | ||
$bundleNames[] = get_class($bundle); | ||
} | ||
|
||
self::assertNotContains(CustomizeBundle::class, $bundleNames); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of EC-CUBE | ||
* | ||
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved. | ||
* | ||
* http://www.ec-cube.co.jp/ | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Customize\Bundle; | ||
|
||
use Customize\DependencyInjection\CustomizeExtension; | ||
use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
|
||
class CustomizeBundle extends Bundle | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of EC-CUBE | ||
* | ||
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved. | ||
* | ||
* http://www.ec-cube.co.jp/ | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
return [ | ||
Customize\Bundle\CustomizeBundle::class => ['all' => true], | ||
]; |