[BUGFIX] Followup to #53691 Failing unit test 23/27223/3
authorFrans Saris <franssaris@gmail.com>
Sat, 1 Feb 2014 08:56:30 +0000 (09:56 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Sat, 1 Feb 2014 11:49:15 +0000 (12:49 +0100)
Remove a duplicate mocking in test fileIndexStatusIsTrueIfUidIsSet()
and setUp() triggered as side effect after patch 71eb69ed230a.

Resolves: #53691
Releases: 6.2
Change-Id: I8ac96d9157bf946bba3c9561369f3553d459f275
Reviewed-on: https://review.typo3.org/27223
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/core/Tests/Unit/Resource/FileTest.php

index dc315ed..eab539a 100644 (file)
@@ -110,10 +110,6 @@ class FileTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function fileIndexStatusIsTrueIfUidIsSet() {
-               $mockedMetaDataRepository = $this->getMock('TYPO3\\CMS\\Core\\Resource\\Index\\MetaDataRepository');
-               $mockedMetaDataRepository->expects($this->once())->method('findByFile')->will($this->returnValue(array('file' => 1)));
-               \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Core\\Resource\\Index\\MetaDataRepository', $mockedMetaDataRepository);
-
                $fixture = new \TYPO3\CMS\Core\Resource\File(array('uid' => 1), $this->storageMock);
                $this->assertTrue($fixture->isIndexed());
        }