Browse Source

DispatcherFactory is also deprecated.

Mark its tests accordingly.
Mark Story 8 years ago
parent
commit
b66053dcd0

+ 3 - 0
src/Routing/DispatcherFactory.php

@@ -20,6 +20,9 @@ use Cake\Routing\Exception\MissingDispatcherFilterException;
 /**
  * A factory for creating dispatchers with all the desired middleware
  * connected.
+ *
+ * @deprecated 3.6.0 This class is part of the deprecated dispatcher system.
+ *   Use Http\Server instead.
  */
 class DispatcherFactory
 {

+ 13 - 0
tests/TestCase/Routing/DispatcherFactoryTest.php

@@ -23,6 +23,7 @@ use Cake\TestSuite\TestCase;
  */
 class DispatcherFactoryTest extends TestCase
 {
+    protected $errorLevel;
 
     /**
      * setup function
@@ -34,6 +35,18 @@ class DispatcherFactoryTest extends TestCase
         parent::setUp();
         static::setAppNamespace();
         DispatcherFactory::clear();
+        $this->errorLevel = error_reporting(E_ALL ^ E_USER_DEPRECATED);
+    }
+
+    /**
+     * teardown function
+     *
+     * @return void
+     */
+    public function tearDown()
+    {
+        parent::tearDown();
+        error_reporting($this->errorLevel);
     }
 
     /**