mirror of
https://github.com/smarty-php/smarty.git
synced 2026-04-29 02:03:31 +02:00
Use __DIR__ instead of dirname(__FILE__) (#817)
This commit is contained in:
committed by
GitHub
parent
4550fc0339
commit
1b556c7077
@@ -17,7 +17,7 @@ class StringResourceTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->setUpSmarty(__DIR__);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class StringResourceTest extends PHPUnit_Smarty
|
||||
|
||||
protected function relative($path)
|
||||
{
|
||||
$path = str_replace(dirname(__FILE__), '.', $path);
|
||||
$path = str_replace(__DIR__, '.', $path);
|
||||
if (DIRECTORY_SEPARATOR == "\\") {
|
||||
$path = str_replace("\\", "/", $path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user