From 15ca8b4076ebc3a75ed1ba77d8b53b584e080b6c Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 24 Sep 2010 16:34:03 +0200 Subject: [PATCH] [FrameworkBundle] removed obsolete file --- .../Command/InitApplicationCommandTest.php | 79 ------------------- 1 file changed, 79 deletions(-) delete mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Command/InitApplicationCommandTest.php diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/InitApplicationCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/InitApplicationCommandTest.php deleted file mode 100644 index ad93e8ab6a..0000000000 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/InitApplicationCommandTest.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Tests\Command; - -use Symfony\Bundle\FrameworkBundle\Tests\TestCase; -use Symfony\Bundle\FrameworkBundle\Command\InitApplicationCommand; -use Symfony\Bundle\FrameworkBundle\Util\Filesystem; -use Symfony\Component\Console\Tester\CommandTester; -use Symfony\Component\HttpFoundation\Request; - -require_once __DIR__.'/../TestCase.php'; - -class InitApplicationCommandTest extends TestCase -{ - /** - * @dataProvider getFormat - * @runInSeparateProcess - */ - public function testExecution($format) - { - $tmpDir = sys_get_temp_dir().'/sf_hello'; - $filesystem = new Filesystem(); - $filesystem->remove($tmpDir); - - $tester = new CommandTester(new InitApplicationCommand()); - $tester->execute(array( - 'name' => 'Hello'.$format, - 'path' => $tmpDir.'/hello'.$format, - 'web_path' => $tmpDir.'/web', - '--format' => $format, - )); - $filesystem->mkdirs($tmpDir.'/src'); - $filesystem->touch($tmpDir.'/src/autoload.php'); - - $class = 'Hello'.$format.'Kernel'; - $file = $tmpDir.'/hello'.$format.'/'.$class.'.php'; - $this->assertTrue(file_exists($file)); - - $content = file_get_contents($file); - $content = str_replace( - "__DIR__.'/../src/vendor/Symfony/src/Symfony/Bundle'", - "'".__DIR__."/../../..'", - $content - ); - file_put_contents($file, $content); - - require_once $file; - - $kernel = new $class('dev', true); - $response = $kernel->handle(Request::create('/')); - - $this->assertRegExp('/successfully/', $response->getContent()); - - $filesystem->remove($tmpDir); - } - - public function getFormat() - { - return array( - array('xml'), - array('yml'), - array('php'), - ); - } - - protected function prepareTemplate(\Text_Template $template) - { - $template->setFile(__DIR__.'/TestCaseMethod.tpl'); - } -}