Browse Source
refactor: migrate dirname to __DIR__ constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pull/48041/head
Christoph Wurst
1 year ago
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
2 changed files with
4 additions and
4 deletions
-
apps/theming/tests/IconBuilderTest.php
-
lib/private/TempManager.php
|
|
|
@ -84,7 +84,7 @@ class IconBuilderTest extends TestCase { |
|
|
|
->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 @@ class IconBuilderTest extends TestCase { |
|
|
|
->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 @@ class IconBuilderTest extends TestCase { |
|
|
|
->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(); |
|
|
|
|
|
|
|
@ -216,7 +216,7 @@ class TempManager implements ITempManager { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$temp = tempnam(dirname(__FILE__), ''); |
|
|
|
$temp = tempnam(__DIR__, ''); |
|
|
|
if (file_exists($temp)) { |
|
|
|
unlink($temp); |
|
|
|
return dirname($temp); |
|
|
|
|