Browse Source

Address feedback from review.

Mark Story 8 years ago
parent
commit
62314dcbb7
2 changed files with 3 additions and 2 deletions
  1. 1 0
      src/Core/functions.php
  2. 2 2
      tests/TestCase/Core/FunctionsTest.php

+ 1 - 0
src/Core/functions.php

@@ -263,6 +263,7 @@ if (!function_exists('deprecationWarning')) {
         if (!(error_reporting() & E_USER_DEPRECATED)) {
             return;
         }
+
         $trace = debug_backtrace();
         if (isset($trace[$stackFrame])) {
             $frame = $trace[$stackFrame];

+ 2 - 2
tests/TestCase/Core/FunctionsTest.php

@@ -44,7 +44,7 @@ class FunctionsTest extends TestCase
     }
 
     /**
-     * Test error messages coming out when debug is on
+     * Test error messages coming out when debug is on, manually setting the stack frame
      *
      * @expectedException PHPUnit\Framework\Error\Deprecated
      * @expectedExceptionMessage This is going away - [internal], line: ??
@@ -56,7 +56,7 @@ class FunctionsTest extends TestCase
     }
 
     /**
-     * Test error messages coming out when debug is on
+     * Test error messages coming out when debug is on, not setting the stack frame manually
      *
      * @expectedException PHPUnit\Framework\Error\Deprecated
      * @expectedExceptionMessageRegExp /This is going away - (.*?)\/TestCase.php, line\: \d+/