[BUGFIX] Fix unit tests for changed identifier
authorHelmut Hummel <helmut.hummel@typo3.org>
Sat, 30 Jun 2012 18:40:53 +0000 (20:40 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Sat, 30 Jun 2012 18:42:13 +0000 (20:42 +0200)
Because of the identifiers being changed in the last
commit, the unit tests failed.

Adjust the tests according to the change.

Change-Id: I62a168ffc5fe63fffc205ff551a7f954c197bc5c
Resolves: #38507
Releases: 6.0
Reviewed-on: http://review.typo3.org/12484
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
tests/Unit/t3lib/class.t3lib_extmgmTest.php

index bb2e2a7..bf8cc11 100644 (file)
@@ -808,8 +808,11 @@ class t3lib_extmgmTest extends tx_phpunit_testcase {
        /**
         * @test
         */
-       public function getTypo3LoadedExtensionInformationCacheIdentifierCreatesSha1WithFourtyCharacters() {
-               $sha1 = t3lib_extMgmAccessibleProxy::getTypo3LoadedExtensionInformationCacheIdentifier();
+       public function getTypo3LoadedExtensionInformationCacheIdentifierCreatesSha1WithFourtyCharactersAndPrefix() {
+               $prefix = 'loaded_extensions_';
+               $identifier = t3lib_extMgmAccessibleProxy::getTypo3LoadedExtensionInformationCacheIdentifier();
+               $this->assertStringStartsWith($prefix, $identifier);
+               $sha1 = str_replace($prefix, '', $identifier);
                $this->assertEquals(40, strlen($sha1));
        }
 
@@ -904,8 +907,11 @@ class t3lib_extmgmTest extends tx_phpunit_testcase {
        /**
         * @test
         */
-       public function getExtLocalconfCacheIdentifierCreatesSha1WithFourtyCharacters() {
-               $sha1 = t3lib_extMgmAccessibleProxy::getExtLocalconfCacheIdentifier();
+       public function getExtLocalconfCacheIdentifierCreatesSha1WithFourtyCharactersAndPrefix() {
+               $prefix = 'ext_localconf_';
+               $identifier = t3lib_extMgmAccessibleProxy::getExtLocalconfCacheIdentifier();
+               $this->assertStringStartsWith($prefix, $identifier);
+               $sha1 = str_replace($prefix, '', $identifier);
                $this->assertEquals(40, strlen($sha1));
        }
 
@@ -985,8 +991,11 @@ class t3lib_extmgmTest extends tx_phpunit_testcase {
        /**
         * @test
         */
-       public function getExtTablesCacheIdentifierCreatesSha1WithFourtyCharacters() {
-               $sha1 = t3lib_extMgmAccessibleProxy::getExtTablesCacheIdentifier();
+       public function getExtTablesCacheIdentifierCreatesSha1WithFourtyCharactersAndPrefix() {
+               $prefix = 'ext_tables_';
+               $identifier = t3lib_extMgmAccessibleProxy::getExtTablesCacheIdentifier();
+               $this->assertStringStartsWith($prefix, $identifier);
+               $sha1 = str_replace($prefix, '', $identifier);
                $this->assertEquals(40, strlen($sha1));
        }