diff --git a/apps/theming/tests/IconBuilderTest.php b/apps/theming/tests/IconBuilderTest.php index 81ea8a5ead3bb..0d8b8c8392304 100644 --- a/apps/theming/tests/IconBuilderTest.php +++ b/apps/theming/tests/IconBuilderTest.php @@ -84,7 +84,7 @@ public function testRenderAppIcon($app, $color, $file) { ->with('global/images') ->willThrowException(new NotFoundException()); - $expectedIcon = new \Imagick(realpath(dirname(__FILE__)). '/data/' . $file); + $expectedIcon = new \Imagick(realpath(__DIR__). '/data/' . $file); $icon = $this->iconBuilder->renderAppIcon($app, 512); $this->assertEquals(true, $icon->valid()); @@ -113,7 +113,7 @@ public function testGetTouchIcon($app, $color, $file) { ->with('global/images') ->willThrowException(new NotFoundException()); - $expectedIcon = new \Imagick(realpath(dirname(__FILE__)). '/data/' . $file); + $expectedIcon = new \Imagick(realpath(__DIR__). '/data/' . $file); $icon = new \Imagick(); $icon->readImageBlob($this->iconBuilder->getTouchIcon($app)); @@ -146,7 +146,7 @@ public function testGetFavicon($app, $color, $file) { ->with('global/images') ->willThrowException(new NotFoundException()); - $expectedIcon = new \Imagick(realpath(dirname(__FILE__)). '/data/' . $file); + $expectedIcon = new \Imagick(realpath(__DIR__). '/data/' . $file); $actualIcon = $this->iconBuilder->getFavicon($app); $icon = new \Imagick(); diff --git a/lib/private/TempManager.php b/lib/private/TempManager.php index 74b4d6b1f2457..f55d722d9d9bd 100644 --- a/lib/private/TempManager.php +++ b/lib/private/TempManager.php @@ -216,7 +216,7 @@ public function getTempBaseDir() { } } - $temp = tempnam(dirname(__FILE__), ''); + $temp = tempnam(__DIR__, ''); if (file_exists($temp)) { unlink($temp); return dirname($temp);