[BUGFIX] Failing unit tests due to wrong path handling
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Tests / Unit / View / StandaloneViewTest.php
index 2d87c2a..aa773c2 100644 (file)
@@ -255,7 +255,7 @@ class StandaloneViewTest extends UnitTestCase {
         * @test
         */
        public function renderLoadsSpecifiedTemplateFileAndPassesSourceToTemplateParser() {
-               $templatePathAndFilename = __DIR__ . '/Fixtures/StandaloneViewFixture.html';
+               $templatePathAndFilename = GeneralUtility::fixWindowsFilePath(__DIR__) . '/Fixtures/StandaloneViewFixture.html';
                $expectedResult = file_get_contents($templatePathAndFilename);
                $this->view->setTemplatePathAndFilename($templatePathAndFilename);
                $this->mockTemplateParser->expects($this->once())->method('parse')->with($expectedResult);
@@ -375,7 +375,7 @@ class StandaloneViewTest extends UnitTestCase {
         * @test
         */
        public function getLayoutSourceReturnsContentOfLayoutFileForTheDefaultFormat() {
-               $layoutRootPath = __DIR__ . '/Fixtures';
+               $layoutRootPath = GeneralUtility::fixWindowsFilePath(__DIR__) . '/Fixtures';
                $this->view->setLayoutRootPath($layoutRootPath);
                $this->mockRequest->expects($this->once())->method('getFormat')->will($this->returnValue('html'));
                $this->view->expects($this->once())->method('testFileExistence')->with($layoutRootPath . '/LayoutFixture.html')->will($this->returnValue(TRUE));
@@ -388,7 +388,7 @@ class StandaloneViewTest extends UnitTestCase {
         * @test
         */
        public function getLayoutSourceReturnsContentOfLayoutFileForTheSpecifiedFormat() {
-               $layoutRootPath = __DIR__ . '/Fixtures';
+               $layoutRootPath = GeneralUtility::fixWindowsFilePath(__DIR__) . '/Fixtures';
                $this->view->setLayoutRootPath($layoutRootPath);
                $this->mockRequest->expects($this->once())->method('getFormat')->will($this->returnValue('xml'));
                $this->view->expects($this->once())->method('testFileExistence')->with($layoutRootPath . '/LayoutFixture.xml')->will($this->returnValue(TRUE));
@@ -401,7 +401,7 @@ class StandaloneViewTest extends UnitTestCase {
         * @test
         */
        public function getLayoutSourceReturnsContentOfDefaultLayoutFileIfNoLayoutExistsForTheSpecifiedFormat() {
-               $layoutRootPath = __DIR__ . '/Fixtures';
+               $layoutRootPath = GeneralUtility::fixWindowsFilePath(__DIR__) . '/Fixtures';
                $this->view->setLayoutRootPath($layoutRootPath);
                $this->mockRequest->expects($this->once())->method('getFormat')->will($this->returnValue('foo'));
                $this->view->expects($this->at(0))->method('testFileExistence')->with($layoutRootPath . '/LayoutFixture.foo')->will($this->returnValue(FALSE));