瀏覽代碼

[FrameworkBundle] removed unneeded files in tests

Fabien Potencier 14 年之前
父節點
當前提交
30e907663b

+ 0 - 2
src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php

@@ -17,8 +17,6 @@ use Symfony\Component\HttpFoundation\Request;
 use Symfony\Bundle\FrameworkBundle\Controller\RedirectController;
 use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
 use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser;
-use Symfony\Bundle\FrameworkBundle\Tests\Logger;
-use Symfony\Bundle\FrameworkBundle\Tests\Kernel;
 
 /**
  * @author Marcin Sikon<marcin.sikon@gmail.com>

+ 0 - 65
src/Symfony/Bundle/FrameworkBundle/Tests/Kernel.php

@@ -1,65 +0,0 @@
-<?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;
-
-use Symfony\Component\HttpKernel\Kernel as BaseKernel;
-use Symfony\Component\HttpKernel\Util\Filesystem;
-use Symfony\Component\ClassLoader\UniversalClassLoader;
-use Symfony\Component\Config\Loader\LoaderInterface;
-
-class Kernel extends BaseKernel
-{
-    public function __construct()
-    {
-        $this->rootDir = sys_get_temp_dir().'/sf2_'.rand(1, 9999);
-        if (!is_dir($this->rootDir)) {
-            if (false === @mkdir($this->rootDir)) {
-                exit(sprintf('Unable to create a temporary directory (%s)', $this->rootDir));
-            }
-        } elseif (!is_writable($this->rootDir)) {
-            exit(sprintf('Unable to write in a temporary directory (%s)', $this->rootDir));
-        }
-
-        parent::__construct('env', true);
-
-        $loader = new UniversalClassLoader();
-        $loader->registerNamespaces(array(
-            'TestBundle'      => __DIR__.'/Fixtures/',
-            'TestApplication' => __DIR__.'/Fixtures/',
-        ));
-        $loader->register();
-    }
-
-    public function __destruct()
-    {
-        $fs = new Filesystem();
-        $fs->remove($this->rootDir);
-    }
-
-    public function registerBundles()
-    {
-        return array(
-            new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
-            new \TestBundle\Sensio\FooBundle\SensioFooBundle(),
-            new \TestBundle\Sensio\Cms\FooBundle\SensioCmsFooBundle(),
-            new \TestBundle\FooBundle\FooBundle(),
-            new \TestBundle\Fabpot\FooBundle\FabpotFooBundle(),
-        );
-    }
-
-    public function registerContainerConfiguration(LoaderInterface $loader)
-    {
-        $loader->load(function ($container) {
-            $container->setParameter('kernel.compiled_classes', array());
-        });
-    }
-}

+ 0 - 88
src/Symfony/Bundle/FrameworkBundle/Tests/Logger.php

@@ -1,88 +0,0 @@
-<?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;
-
-use Symfony\Component\HttpKernel\Log\LoggerInterface;
-
-class Logger implements LoggerInterface
-{
-    protected $logs;
-
-    public function __construct()
-    {
-        $this->clear();
-    }
-
-    public function getLogs($priority = false)
-    {
-        return false === $priority ? $this->logs : $this->logs[$priority];
-    }
-
-    public function clear()
-    {
-        $this->logs = array(
-            'emerg' => array(),
-            'alert' => array(),
-            'crit' => array(),
-            'err' => array(),
-            'warn' => array(),
-            'notice' => array(),
-            'info' => array(),
-            'debug' => array(),
-        );
-    }
-
-    public function log($message, $priority)
-    {
-        $this->logs[$priority][] = $message;
-    }
-
-    public function emerg($message)
-    {
-        $this->log($message, 'emerg');
-    }
-
-    public function alert($message)
-    {
-        $this->log($message, 'alert');
-    }
-
-    public function crit($message)
-    {
-        $this->log($message, 'crit');
-    }
-
-    public function err($message)
-    {
-        $this->log($message, 'err');
-    }
-
-    public function warn($message)
-    {
-        $this->log($message, 'warn');
-    }
-
-    public function notice($message)
-    {
-        $this->log($message, 'notice');
-    }
-
-    public function info($message)
-    {
-        $this->log($message, 'info');
-    }
-
-    public function debug($message)
-    {
-        $this->log($message, 'debug');
-    }
-}

+ 0 - 1
src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateTest.php

@@ -12,7 +12,6 @@
 namespace Symfony\Bundle\FrameworkBundle\Tests\Templating;
 
 use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
-use Symfony\Bundle\FrameworkBundle\Tests\Kernel;
 use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference;
 
 class TemplateTest extends TestCase