Permalink
Browse files

Added a test case to demonstrate the fatal error occuring when a Bund…

…le implementing BundleInterface only is registered in the kernel.
  • Loading branch information...
1 parent 1da896d commit 30bcb572862bf486f9f33a2519e69d62e37a4014 @Josiah Josiah committed Aug 1, 2012
Showing with 35 additions and 0 deletions.
  1. +35 −0 src/Symfony/Bundle/FrameworkBundle/Tests/Console/ApplicationTest.php
@@ -0,0 +1,35 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Bundle\FrameworkBundle\Tests\Console;
+
+use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
+use Symfony\Bundle\FrameworkBundle\Console\Application;
+use Symfony\Component\Console\Input\ArrayInput;
+use Symfony\Component\Console\Output\NullOutput;
+
+class ApplicationTest extends TestCase
+{
+ public function testBundleInterfaceImplementation()
+ {
+ $bundle = $this->getMock("Symfony\Component\HttpKernel\Bundle\BundleInterface");
+
+ $kernel = $this->getMock("Symfony\Component\HttpKernel\KernelInterface");
+ $kernel
+ ->expects($this->any())
+ ->method('getBundles')
+ ->will($this->returnValue(array($bundle)))
+ ;
+
+ $application = new Application($kernel);
+ $application->doRun(new ArrayInput(array('list')), new NullOutput());
+ }
+}

0 comments on commit 30bcb57

Please sign in to comment.