-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
12 changed files
with
71 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/Tests export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/.gitignore export-ignore |
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 |
---|---|---|
|
@@ -5,3 +5,5 @@ composer.lock | |
composer.phar | ||
.php_cs.cache | ||
/build | ||
.phpunit.result.cache | ||
/var |
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
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 |
---|---|---|
@@ -1,6 +1,11 @@ | ||
CHANGELOG | ||
========= | ||
|
||
v0.2.0 | ||
------ | ||
|
||
* Symfony 5 compatibility | ||
|
||
v0.1.0 | ||
------ | ||
|
||
|
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
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,30 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the FacadeBundle | ||
* | ||
* (c) Indra Gunawan <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Indragunawan\FacadeBundle\Tests\Fixtures; | ||
|
||
use Symfony\Component\Config\Loader\LoaderInterface; | ||
use Symfony\Component\HttpKernel\Kernel as BaseKernel; | ||
|
||
final class Kernel extends BaseKernel | ||
{ | ||
public function registerBundles() | ||
{ | ||
return [ | ||
new \Indragunawan\FacadeBundle\IndragunawanFacadeBundle(), | ||
]; | ||
} | ||
|
||
public function registerContainerConfiguration(LoaderInterface $loader) | ||
{ | ||
return null; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -11,40 +11,19 @@ | |
|
||
namespace Indragunawan\FacadeBundle\Tests; | ||
|
||
use Indragunawan\FacadeBundle\IndragunawanFacadeBundle; | ||
use PHPUnit\Framework\TestCase; | ||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | ||
use Symfony\Component\DependencyInjection\ServiceLocator; | ||
use Symfony\Component\HttpKernel\Kernel; | ||
|
||
/** | ||
* @author Indra Gunawan <[email protected]> | ||
*/ | ||
class IndragunawanFacadeBundleTest extends TestCase | ||
class IndragunawanFacadeBundleTest extends KernelTestCase | ||
{ | ||
public function testBundle() | ||
{ | ||
$kernel = $this->getKernel(); | ||
$kernel->boot(); | ||
$kernel = $this->bootKernel(['environment' => 'test', 'debug' => true]); | ||
|
||
$this->assertTrue($kernel->getContainer()->has('indragunawan.facade.container')); | ||
$this->assertInstanceOf(ServiceLocator::class, $kernel->getContainer()->get('indragunawan.facade.container')); | ||
} | ||
|
||
protected function getKernel() | ||
{ | ||
$kernel = $this | ||
->getMockBuilder(Kernel::class) | ||
->setMethods(['registerBundles']) | ||
->setConstructorArgs(['test', false]) | ||
->getMockForAbstractClass() | ||
; | ||
$kernel->method('registerBundles') | ||
->will($this->returnValue([new IndragunawanFacadeBundle()])) | ||
; | ||
$p = new \ReflectionProperty($kernel, 'rootDir'); | ||
$p->setAccessible(true); | ||
$p->setValue($kernel, sys_get_temp_dir()); | ||
|
||
return $kernel; | ||
} | ||
} |
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