mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
fix tests
This commit is contained in:
parent
3d7586f385
commit
9d239ebd98
|
|
@ -97,11 +97,7 @@ final class ApplicationManager
|
|||
$destination = \rtrim($destination, '\\/');
|
||||
$source = \rtrim($source, '/\\');
|
||||
|
||||
if (!\is_dir(\dirname($destination))) {
|
||||
Directory::create(\dirname($destination), 0755, true);
|
||||
}
|
||||
|
||||
if (!\is_dir($source) || ($path = \realpath($destination)) === false
|
||||
if (!\is_dir($source) || \is_dir($destination)
|
||||
|| !\is_file($source . '/Admin/Installer.php')
|
||||
) {
|
||||
return false;
|
||||
|
|
@ -114,6 +110,10 @@ final class ApplicationManager
|
|||
$this->installFiles($source, $destination);
|
||||
$this->replacePlaceholder($destination);
|
||||
|
||||
if (($path = \realpath($destination)) === false) {
|
||||
return false; // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
$classPath = \substr($path . '/Admin/Installer', (int) \strlen((string) \realpath(__DIR__ . '/../../')));
|
||||
|
||||
// @var class-string<InstallerAbstract> $class
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ class ApplicationManagerTest extends \PHPUnit\Framework\TestCase
|
|||
{
|
||||
Directory::delete(__DIR__ . '/Apps/Testapp');
|
||||
|
||||
$this->appManager->install(__DIR__ . '/Testapp', __DIR__ . '/Apps/Testapp');
|
||||
self::assertTrue($this->appManager->install(__DIR__ . '/Testapp', __DIR__ . '/Apps/Testapp'));
|
||||
|
||||
$this->appManager->reInit(__DIR__ . '/Apps/Testapp');
|
||||
self::assertEquals($r1 = include __DIR__ . '/Testapp/Admin/Install/Application/Routes.php', $r2 = include __DIR__ . '/Apps/Testapp/Routes.php');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user