[TASK] Adapt DriverRegistryTest to the changed behaviour
authorSteffen Ritter <info@rs-websystems.de>
Mon, 17 Sep 2012 17:43:44 +0000 (19:43 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Mon, 17 Sep 2012 17:46:14 +0000 (19:46 +0200)
The DriverRegistry does not throw exception anymore, if the
same Driver is registered twice. The Exception only is
thrown if another driver takes the same key.

Change-Id: I16c0aa5bc98d7da90a47615ea675ab655391e1dc
Releases: 6.0
Fixes: 40843
Reviewed-on: http://review.typo3.org/14669
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/core/Tests/Unit/Resource/Driver/DriverRegistryTest.php

index 29abb74..ef03bb9 100644 (file)
@@ -83,11 +83,12 @@ class DriverRegistryTest extends \Tx_Phpunit_TestCase {
        /**
         * @test
         */
-       public function registerDriverClassThrowsExceptionIfShortnameIsAlreadyTaken() {
+       public function registerDriverClassThrowsExceptionIfShortnameIsAlreadyTakenByAnotherDriverClass() {
                $this->setExpectedException('InvalidArgumentException', '', 1314979451);
                $className = $this->getMockClass('TYPO3\\CMS\\Core\\Resource\\Driver\\AbstractDriver');
+               $className2 = '\stdClass';
                $this->fixture->registerDriverClass($className, 'foobar');
-               $this->fixture->registerDriverClass($className, 'foobar');
+               $this->fixture->registerDriverClass($className2, 'foobar');
        }
 
        /**