From c63e91803f8f134637fd1b145c0d51ad0dd06c37 Mon Sep 17 00:00:00 2001 From: Lesnykh Ilia Date: Fri, 21 Apr 2017 12:42:08 +0300 Subject: [PATCH 1/4] Update AppKernel.php --- Tests/app/AppKernel.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Tests/app/AppKernel.php b/Tests/app/AppKernel.php index 05ca7f9..70a9e15 100644 --- a/Tests/app/AppKernel.php +++ b/Tests/app/AppKernel.php @@ -1,4 +1,5 @@ Date: Fri, 21 Apr 2017 13:29:55 +0300 Subject: [PATCH 2/4] Update FakeControllerTest.php --- Tests/Controller/FakeControllerTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Tests/Controller/FakeControllerTest.php b/Tests/Controller/FakeControllerTest.php index fc3c2bf..0d21c6c 100644 --- a/Tests/Controller/FakeControllerTest.php +++ b/Tests/Controller/FakeControllerTest.php @@ -71,4 +71,14 @@ public function testReadAndSaveAction() $this->assertFileExists($content, sprintf('file %s should exist', $content)); } + + /** + * @inheritdoc + */ + protected static function getKernelClass() + { + require_once __DIR__.'/../app/AppKernel.php'; + + return 'Liuggio\ExcelBundle\Tests\app\AppKernel'; + } } From 8456e41b1e91d101e544c138d2614b3a4164fa33 Mon Sep 17 00:00:00 2001 From: Lesnykh Ilia Date: Fri, 21 Apr 2017 13:50:57 +0300 Subject: [PATCH 3/4] Fix namespaces path. --- Tests/app/AppKernel.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/app/AppKernel.php b/Tests/app/AppKernel.php index 70a9e15..b4a5fc4 100644 --- a/Tests/app/AppKernel.php +++ b/Tests/app/AppKernel.php @@ -10,10 +10,10 @@ public function registerBundles() { $bundles = array( // Dependencies - new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), - new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), + new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(), + new \Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), // My Bundle to test - new Liuggio\ExcelBundle\LiuggioExcelBundle(), + new \Liuggio\ExcelBundle\LiuggioExcelBundle(), ); return $bundles; From 3e3138fc8e30ea3342d60a28f2b29cd926881b89 Mon Sep 17 00:00:00 2001 From: Lesnykh Ilia Date: Fri, 21 Apr 2017 13:56:33 +0300 Subject: [PATCH 4/4] Remove redundant require. --- Tests/Controller/FakeControllerTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Tests/Controller/FakeControllerTest.php b/Tests/Controller/FakeControllerTest.php index 0d21c6c..5152aa3 100644 --- a/Tests/Controller/FakeControllerTest.php +++ b/Tests/Controller/FakeControllerTest.php @@ -2,6 +2,7 @@ namespace Liuggio\ExcelBundle\Tests\Controller; +use Liuggio\ExcelBundle\Tests\app\AppKernel; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -77,8 +78,6 @@ public function testReadAndSaveAction() */ protected static function getKernelClass() { - require_once __DIR__.'/../app/AppKernel.php'; - - return 'Liuggio\ExcelBundle\Tests\app\AppKernel'; + return AppKernel::class; } }