Browse Source

Removed methods which implemented interfaces by throwing \LogicException('You must override...').

Artur Kotyrba 14 years ago
parent
commit
308e85a5a7

+ 0 - 14
src/Symfony/Component/DependencyInjection/Dumper/Dumper.php

@@ -31,18 +31,4 @@ abstract class Dumper implements DumperInterface
     {
         $this->container = $container;
     }
-
-    /**
-     * Dumps the service container.
-     *
-     * @param  array  $options An array of options
-     *
-     * @return string The representation of the service container
-     *
-     * @throws \LogicException When this abstract class is not implemented
-     */
-    public function dump(array $options = array())
-    {
-        throw new \LogicException('You must extend this abstract class and implement the dump() method.');
-    }
 }

+ 7 - 0
src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php

@@ -18,5 +18,12 @@ namespace Symfony\Component\DependencyInjection\Dumper;
  */
 interface DumperInterface
 {
+    /**
+     * Dumps the service container.
+     *
+     * @param  array  $options An array of options
+     *
+     * @return string The representation of the service container
+     */
     function dump(array $options = array());
 }

+ 0 - 14
src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumper.php

@@ -32,18 +32,4 @@ abstract class GeneratorDumper implements GeneratorDumperInterface
     {
         $this->routes = $routes;
     }
-
-    /**
-     * Dumps the routing.
-     *
-     * @param  array  $options An array of options
-     *
-     * @return string The representation of the routing
-     *
-     * @throws \LogicException When this abstract class is not implemented
-     */
-    public function dump(array $options = array())
-    {
-        throw new \LogicException('You must extend this abstract class and implement the dump() method.');
-    }
 }

+ 0 - 14
src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumper.php

@@ -32,18 +32,4 @@ abstract class MatcherDumper implements MatcherDumperInterface
     {
         $this->routes = $routes;
     }
-
-    /**
-     * Dumps the routing.
-     *
-     * @param  array  $options An array of options
-     *
-     * @return string The representation of the routing
-     *
-     * @throws \LogicException When this abstract class is not implemented
-     */
-    public function dump(array $options = array())
-    {
-        throw new \LogicException('You must extend this abstract class and implement the dump() method.');
-    }
 }

+ 0 - 34
tests/Symfony/Tests/Component/DependencyInjection/Dumper/DumperTest.php

@@ -1,34 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Tests\Component\DependencyInjection\Dumper;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Dumper\Dumper;
-
-class DumperTest extends \PHPUnit_Framework_TestCase
-{
-    public function testDump()
-    {
-        $builder = new ContainerBuilder();
-        $dumper = new ProjectDumper($builder);
-        try {
-            $dumper->dump();
-            $this->fail('->dump() returns a LogicException if the dump() method has not been overriden by a children class');
-        } catch (\Exception $e) {
-            $this->assertInstanceOf('\LogicException', $e, '->dump() returns a LogicException if the dump() method has not been overriden by a children class');
-            $this->assertEquals('You must extend this abstract class and implement the dump() method.', $e->getMessage(), '->dump() returns a LogicException if the dump() method has not been overriden by a children class');
-        }
-    }
-}
-
-class ProjectDumper extends Dumper
-{
-}