[FOLLOWUP] Add PSR-4 autoload sections to composer.json 08/36108/2
authorHelmut Hummel <helmut.hummel@typo3.org>
Mon, 19 Jan 2015 16:09:41 +0000 (17:09 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 19 Jan 2015 16:18:59 +0000 (17:18 +0100)
A bogus test, which tests Flow behavior which is not present
in TYPO3 CMS package management caused a test to fail.

Fix this test to actually test the correct thing.

Releases: master, 6.2
Change-Id: Ideff51a32c3cdf3471472f9df743da0b3387abdc
Reviewed-on: http://review.typo3.org/36108
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Tests/Unit/Package/PackageTest.php

index bbd18e7..63520a2 100644 (file)
@@ -12,6 +12,7 @@ namespace TYPO3\CMS\Core\Tests\Unit\Package;
  *                                                                        */
 
 use TYPO3\Flow\Package\Package as FlowPackage;
+use TYPO3\CMS\Core\Package\Package as TYPO3Package;
 use org\bovigo\vfs\vfsStream;
 
 /**
@@ -114,9 +115,11 @@ class PackageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function getClassesPathReturnsPathToClasses() {
-               $package = new FlowPackage($this->getMock(\TYPO3\CMS\Core\Package\PackageManager::class), 'TYPO3.CMS.Core', PATH_typo3 . 'sysext/core/', FlowPackage::DIRECTORY_CLASSES);
+               $packageManagerMock = $this->getMock(\TYPO3\CMS\Core\Package\PackageManager::class);
+               $packageManagerMock->expects($this->any())->method('isPackageKeyValid')->willReturn(TRUE);
+               $package = new TYPO3Package($packageManagerMock, 'core', PATH_typo3 . 'sysext/core/', TYPO3Package::DIRECTORY_CLASSES);
                $packageClassesPath = $package->getClassesPath();
-               $expected = $package->getPackagePath() . FlowPackage::DIRECTORY_CLASSES;
+               $expected = $package->getPackagePath() . TYPO3Package::DIRECTORY_CLASSES;
                $this->assertEquals($expected, $packageClassesPath);
        }