Browse Source

Rename new methods to clarify their intention

Michael Hoffmann 9 years ago
parent
commit
b1379f6a5e
2 changed files with 8 additions and 8 deletions
  1. 3 3
      src/Error/Debugger.php
  2. 5 5
      tests/TestCase/Error/DebuggerTest.php

+ 3 - 3
src/Error/Debugger.php

@@ -655,7 +655,7 @@ class Debugger
      *
      * @return string Returns the current format when getting.
      */
-    public static function getOutputAs()
+    public static function getOutputFormat()
     {
         return Debugger::getInstance()->_outputFormat;
     }
@@ -667,7 +667,7 @@ class Debugger
      * @return void
      * @throws \InvalidArgumentException When choosing a format that doesn't exist.
      */
-    public static function setOutputAs($format)
+    public static function setOutputFormat($format)
     {
         $self = Debugger::getInstance();
 
@@ -680,7 +680,7 @@ class Debugger
     /**
      * Get/Set the output format for Debugger error rendering.
      *
-     * @deprecated 3.5.0 Use getOutputAs()/setOutputAs() instead.
+     * @deprecated 3.5.0 Use getOutputFormat()/setOutputFormat() instead.
      * @param string|null $format The format you want errors to be output as.
      *   Leave null to get the current format.
      * @return string|null Returns null when setting. Returns the current format when getting.

+ 5 - 5
tests/TestCase/Error/DebuggerTest.php

@@ -154,14 +154,14 @@ class DebuggerTest extends TestCase
     }
 
     /**
-     * Test that getOutputAs/setOutputAs works.
+     * Test that getOutputFormat/setOutputFormat works.
      *
      * @return void
      */
-    public function testGetSetOutputAs()
+    public function testGetSetOutputFormat()
     {
-        Debugger::setOutputAs('html');
-        $this->assertEquals('html', Debugger::getOutputAs());
+        Debugger::setOutputFormat('html');
+        $this->assertEquals('html', Debugger::getOutputFormat());
     }
 
     /**
@@ -172,7 +172,7 @@ class DebuggerTest extends TestCase
      */
     public function testSetOutputAsException()
     {
-        Debugger::setOutputAs('Invalid junk');
+        Debugger::setOutputFormat('Invalid junk');
     }
 
     /**