Browse Source

Fix lint and failing tests.

Mark Story 5 years ago
parent
commit
f5c242f4f7

+ 2 - 1
src/Error/Debugger.php

@@ -1061,7 +1061,8 @@ class Debugger
         $salt = Security::getSalt();
         if ($salt === '__SALT__' || strlen($salt) < 32) {
             trigger_error(
-                "Please change the value of `Security.salt` in `ROOT/config/app.php` to a random value of at least 32 characters.",
+                'Please change the value of `Security.salt` in `ROOT/config/app.php` ' .
+                'to a random value of at least 32 characters.',
                 E_USER_NOTICE
             );
         }

+ 7 - 0
tests/TestCase/Auth/FallbackPasswordHasherTest.php

@@ -19,6 +19,7 @@ namespace Cake\Test\TestCase\Auth;
 use Cake\Auth\DefaultPasswordHasher;
 use Cake\Auth\FallbackPasswordHasher;
 use Cake\Auth\WeakPasswordHasher;
+use Cake\Utility\Security;
 use Cake\TestSuite\TestCase;
 
 /**
@@ -26,6 +27,12 @@ use Cake\TestSuite\TestCase;
  */
 class FallbackPasswordHasherTest extends TestCase
 {
+    public function setUp(): void
+    {
+        parent::setUp();
+        Security::setSalt('YJfIxfs2guVoUubWDYhG93b0qyJfIxfs2guwvniR2G0FgaC9mia1390as13dla8kjasdlwerpoiASf');
+    }
+
     /**
      * Tests that only the first hasher is user for hashing a password
      *

+ 1 - 1
tests/TestCase/Auth/WeakPasswordHasherTest.php

@@ -34,7 +34,7 @@ class WeakPasswordHasherTest extends TestCase
     {
         parent::setUp();
 
-        Security::setSalt('YJfIxfs2guVoUubWDYhG93b0qyJfIxfs2guwvniR2G0FgaC9mi');
+        Security::setSalt('YJfIxfs2guVoUubWDYhG93b0qyJfIxfs2guwvniR2G0FgaC9mia1390as13dla8kjasdlwerpoiASf');
     }
 
     /**