[CLEANUP] Adjust code to coding guidelines
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Unit / Security / Cryptography / HashServiceTest.php
index 5d1e5d4..2780728 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography;
+
 /***************************************************************
  *  Copyright notice
  *
 /**
  * Testcase for the Hash Service
  *
- * @version $Id: HashService_testcase.php 1729 2009-11-25 21:37:20Z stucki $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser Public License, version 3 or later
  */
-class Tx_Extbase_Tests_Unit_Security_Cryptography_HashServiceTest extends Tx_Extbase_Tests_Unit_BaseTestCase {
+class HashServiceTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
 
        protected $hashService;
 
        public function setUp() {
-               $this->hashService = new Tx_Extbase_Security_Cryptography_HashService();
+               $this->hashService = new \TYPO3\CMS\Extbase\Security\Cryptography\HashService();
        }
 
        /**
@@ -65,7 +66,7 @@ class Tx_Extbase_Tests_Unit_Security_Cryptography_HashServiceTest extends Tx_Ext
 
        /**
         * @test
-        * @expectedException Tx_Extbase_Security_Exception_InvalidArgumentForHashGeneration
+        * @expectedException \TYPO3\CMS\Extbase\Security\Exception\InvalidArgumentForHashGenerationException
         * @author Sebastian Kurf├╝rst
         */
        public function generateHashThrowsExceptionIfNoStringGiven() {
@@ -94,7 +95,7 @@ class Tx_Extbase_Tests_Unit_Security_Cryptography_HashServiceTest extends Tx_Ext
 
        /**
         * @test
-        * @expectedException Tx_Extbase_Security_Exception_InvalidArgumentForHashGeneration
+        * @expectedException \TYPO3\CMS\Extbase\Security\Exception\InvalidArgumentForHashGenerationException
         */
        public function appendHmacThrowsExceptionIfNoStringGiven() {
                $this->hashService->appendHmac(NULL);
@@ -111,7 +112,7 @@ class Tx_Extbase_Tests_Unit_Security_Cryptography_HashServiceTest extends Tx_Ext
 
        /**
         * @test
-        * @expectedException Tx_Extbase_Security_Exception_InvalidArgumentForHashGeneration
+        * @expectedException \TYPO3\CMS\Extbase\Security\Exception\InvalidArgumentForHashGenerationException
         */
        public function validateAndStripHmacThrowsExceptionIfNoStringGiven() {
                $this->hashService->validateAndStripHmac(NULL);
@@ -119,7 +120,7 @@ class Tx_Extbase_Tests_Unit_Security_Cryptography_HashServiceTest extends Tx_Ext
 
        /**
         * @test
-        * @expectedException Tx_Extbase_Security_Exception_InvalidArgumentForHashGeneration
+        * @expectedException \TYPO3\CMS\Extbase\Security\Exception\InvalidArgumentForHashGenerationException
         */
        public function validateAndStripHmacThrowsExceptionIfGivenStringIsTooShort() {
                $this->hashService->validateAndStripHmac('string with less than 40 characters');
@@ -127,7 +128,7 @@ class Tx_Extbase_Tests_Unit_Security_Cryptography_HashServiceTest extends Tx_Ext
 
        /**
         * @test
-        * @expectedException Tx_Extbase_Security_Exception_InvalidHash
+        * @expectedException \TYPO3\CMS\Extbase\Security\Exception\InvalidHashException
         */
        public function validateAndStripHmacThrowsExceptionIfGivenStringHasNoHashAppended() {
                $this->hashService->validateAndStripHmac('string with exactly a length 40 of chars');
@@ -135,7 +136,7 @@ class Tx_Extbase_Tests_Unit_Security_Cryptography_HashServiceTest extends Tx_Ext
 
        /**
         * @test
-        * @expectedException Tx_Extbase_Security_Exception_InvalidHash
+        * @expectedException \TYPO3\CMS\Extbase\Security\Exception\InvalidHashException
         */
        public function validateAndStripHmacThrowsExceptionIfTheAppendedHashIsInvalid() {
                $this->hashService->validateAndStripHmac('some Stringac43682075d36592d4cb320e69ff0aa515886eab');
@@ -150,7 +151,6 @@ class Tx_Extbase_Tests_Unit_Security_Cryptography_HashServiceTest extends Tx_Ext
                $actualResult = $this->hashService->validateAndStripHmac($hashedString);
                $this->assertSame($string, $actualResult);
        }
-
 }
 
 ?>
\ No newline at end of file