From 2725de8efb7fd3af9b1d5b12a137d21e4adc5b10 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 11 Feb 2015 06:31:16 +0100 Subject: [PATCH] cs --- .../Tests/Controller/WallabagRestControllerTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php index ff3c9432..274a816f 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php @@ -3,7 +3,6 @@ namespace Wallabag\CoreBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; -use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder; class WallabagRestControllerTest extends WebTestCase { @@ -31,13 +30,13 @@ class WallabagRestControllerTest extends WebTestCase $nonce = substr(md5(uniqid('nonce_', true)), 0, 16); $now = new \DateTime('now', new \DateTimeZone('UTC')); - $created = (string)$now->format( 'Y-m-d\TH:i:s\Z' ); + $created = (string) $now->format('Y-m-d\TH:i:s\Z'); $digest = base64_encode(sha1(base64_decode($nonce).$created.$encryptedPassword, true)); $headers = array( 'PHP_AUTH_USER' => 'username', 'HTTP_AUTHORIZATION' => 'Authorization profile="UsernameToken"', - 'HTTP_x-wsse' => 'X-WSSE: UsernameToken Username="'.$username.'", PasswordDigest="'.$digest.'", Nonce="'.$nonce.'", Created="'.$created.'"' + 'HTTP_x-wsse' => 'X-WSSE: UsernameToken Username="'.$username.'", PasswordDigest="'.$digest.'", Nonce="'.$nonce.'", Created="'.$created.'"', ); $client->request('GET', '/api/entries', array(), array(), $headers); -- 2.41.0