mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-05 12:08:42 +00:00
Merge branch 'develop' of https://github.com/Orange-Management/phpOMS into develop
This commit is contained in:
commit
f7c5233d28
|
|
@ -31,7 +31,7 @@ class FtpStorage extends StorageAbstract
|
||||||
{
|
{
|
||||||
private static $con = null;
|
private static $con = null;
|
||||||
|
|
||||||
public static function with($con)
|
public static function with($con) : void
|
||||||
{
|
{
|
||||||
self::$con = $con;
|
self::$con = $con;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ use phpOMS\Dispatcher\Dispatcher;
|
||||||
use phpOMS\Message\Http\HttpRequest;
|
use phpOMS\Message\Http\HttpRequest;
|
||||||
use phpOMS\Module\ModuleManager;
|
use phpOMS\Module\ModuleManager;
|
||||||
use phpOMS\Router\WebRouter;
|
use phpOMS\Router\WebRouter;
|
||||||
use phpOMS\System\File\Local\Directory;
|
|
||||||
use phpOMS\Uri\HttpUri;
|
use phpOMS\Uri\HttpUri;
|
||||||
|
|
||||||
require_once __DIR__ . '/../Autoloader.php';
|
require_once __DIR__ . '/../Autoloader.php';
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
||||||
|
|
||||||
public function testConnection() : void
|
public function testConnection() : void
|
||||||
{
|
{
|
||||||
self::assertNotEquals(false, Directory::ftpConnect(new HttpUri(self::BASE . '/test')));
|
self::assertNotFalse(Directory::ftpConnect(new HttpUri(self::BASE . '/test')));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testInvalidConnection() : void
|
public function testInvalidConnection() : void
|
||||||
|
|
@ -503,18 +503,18 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
||||||
public function testList() : void
|
public function testList() : void
|
||||||
{
|
{
|
||||||
$dirTestPath = __DIR__ . '/dirtest';
|
$dirTestPath = __DIR__ . '/dirtest';
|
||||||
$dir = new Directory(new HttpUri(self::BASE . $dirTestPath), '*', true, self::$con);
|
$dir = new Directory(new HttpUri(self::BASE . $dirTestPath), '*', true, self::$con);
|
||||||
|
|
||||||
self::assertEquals([
|
self::assertEquals([
|
||||||
'sub',
|
'sub',
|
||||||
'test.txt'
|
'test.txt',
|
||||||
], $dir->getList());
|
], $dir->getList());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testNodeOutput() : void
|
public function testNodeOutput() : void
|
||||||
{
|
{
|
||||||
$dirTestPath = __DIR__ . '/dirtest';
|
$dirTestPath = __DIR__ . '/dirtest';
|
||||||
$dir = new Directory(new HttpUri(self::BASE . $dirTestPath), '*', true, self::$con);
|
$dir = new Directory(new HttpUri(self::BASE . $dirTestPath), '*', true, self::$con);
|
||||||
|
|
||||||
self::assertInstanceOf(Directory::class, $dir->getNode('sub'));
|
self::assertInstanceOf(Directory::class, $dir->getNode('sub'));
|
||||||
}
|
}
|
||||||
|
|
@ -616,7 +616,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
||||||
|
|
||||||
public function testNodeArraySet() : void
|
public function testNodeArraySet() : void
|
||||||
{
|
{
|
||||||
$dir = new Directory(new HttpUri(self::BASE . __DIR__), '*', true, self::$con);
|
$dir = new Directory(new HttpUri(self::BASE . __DIR__), '*', true, self::$con);
|
||||||
$dir[] = new Directory(new HttpUri(self::BASE . __DIR__ . '/nodedir'));
|
$dir[] = new Directory(new HttpUri(self::BASE . __DIR__ . '/nodedir'));
|
||||||
|
|
||||||
self::assertTrue(\file_exists(__DIR__ . '/nodedir'));
|
self::assertTrue(\file_exists(__DIR__ . '/nodedir'));
|
||||||
|
|
@ -649,7 +649,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
||||||
public function testNodeCreatedAt() : void
|
public function testNodeCreatedAt() : void
|
||||||
{
|
{
|
||||||
$dirPath = __DIR__ . '/test';
|
$dirPath = __DIR__ . '/test';
|
||||||
$dir = new Directory(new HttpUri(self::BASE . $dirPath), '*', true, self::$con);
|
$dir = new Directory(new HttpUri(self::BASE . $dirPath), '*', true, self::$con);
|
||||||
|
|
||||||
self::assertTrue($dir->createNode());
|
self::assertTrue($dir->createNode());
|
||||||
|
|
||||||
|
|
@ -662,7 +662,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
||||||
public function testNodeChangedAt() : void
|
public function testNodeChangedAt() : void
|
||||||
{
|
{
|
||||||
$dirPath = __DIR__ . '/test';
|
$dirPath = __DIR__ . '/test';
|
||||||
$dir = new Directory(new HttpUri(self::BASE . $dirPath), '*', true, self::$con);
|
$dir = new Directory(new HttpUri(self::BASE . $dirPath), '*', true, self::$con);
|
||||||
|
|
||||||
self::assertTrue($dir->createNode());
|
self::assertTrue($dir->createNode());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
|
||||||
|
|
||||||
public function testConnection() : void
|
public function testConnection() : void
|
||||||
{
|
{
|
||||||
self::assertNotEquals(false, File::ftpConnect(new HttpUri(self::BASE . '/test')));
|
self::assertNotFalse(File::ftpConnect(new HttpUri(self::BASE . '/test')));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testInvalidConnection() : void
|
public function testInvalidConnection() : void
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,10 @@ declare(strict_types=1);
|
||||||
namespace phpOMS\tests\System\File\Ftp;
|
namespace phpOMS\tests\System\File\Ftp;
|
||||||
|
|
||||||
use phpOMS\System\File\ContentPutMode;
|
use phpOMS\System\File\ContentPutMode;
|
||||||
use phpOMS\System\File\Ftp\FtpStorage;
|
|
||||||
use phpOMS\Uri\HttpUri;
|
|
||||||
use phpOMS\System\File\Ftp\Directory;
|
use phpOMS\System\File\Ftp\Directory;
|
||||||
use phpOMS\System\File\Ftp\File;
|
use phpOMS\System\File\Ftp\File;
|
||||||
|
use phpOMS\System\File\Ftp\FtpStorage;
|
||||||
|
use phpOMS\Uri\HttpUri;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @testdox phpOMS\tests\System\File\Ftp\FtpStorageTest: Directory & File handler for local file system
|
* @testdox phpOMS\tests\System\File\Ftp\FtpStorageTest: Directory & File handler for local file system
|
||||||
|
|
|
||||||
|
|
@ -514,18 +514,18 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
||||||
public function testList() : void
|
public function testList() : void
|
||||||
{
|
{
|
||||||
$dirTestPath = __DIR__ . '/dirtest';
|
$dirTestPath = __DIR__ . '/dirtest';
|
||||||
$dir = new Directory($dirTestPath);
|
$dir = new Directory($dirTestPath);
|
||||||
|
|
||||||
self::assertEquals([
|
self::assertEquals([
|
||||||
'sub',
|
'sub',
|
||||||
'test.txt'
|
'test.txt',
|
||||||
], $dir->getList());
|
], $dir->getList());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testNodeOutput() : void
|
public function testNodeOutput() : void
|
||||||
{
|
{
|
||||||
$dirTestPath = __DIR__ . '/dirtest';
|
$dirTestPath = __DIR__ . '/dirtest';
|
||||||
$dir = new Directory($dirTestPath);
|
$dir = new Directory($dirTestPath);
|
||||||
|
|
||||||
self::assertInstanceOf(Directory::class, $dir->getNode('sub'));
|
self::assertInstanceOf(Directory::class, $dir->getNode('sub'));
|
||||||
}
|
}
|
||||||
|
|
@ -627,7 +627,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
||||||
|
|
||||||
public function testNodeArraySet() : void
|
public function testNodeArraySet() : void
|
||||||
{
|
{
|
||||||
$dir = new Directory(__DIR__);
|
$dir = new Directory(__DIR__);
|
||||||
$dir[] = new Directory(__DIR__ . '/nodedir');
|
$dir[] = new Directory(__DIR__ . '/nodedir');
|
||||||
|
|
||||||
self::assertTrue(\file_exists(__DIR__ . '/nodedir'));
|
self::assertTrue(\file_exists(__DIR__ . '/nodedir'));
|
||||||
|
|
@ -660,7 +660,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
||||||
public function testNodeCreatedAt() : void
|
public function testNodeCreatedAt() : void
|
||||||
{
|
{
|
||||||
$dirPath = __DIR__ . '/test';
|
$dirPath = __DIR__ . '/test';
|
||||||
$dir = new Directory($dirPath);
|
$dir = new Directory($dirPath);
|
||||||
|
|
||||||
self::assertTrue($dir->createNode());
|
self::assertTrue($dir->createNode());
|
||||||
|
|
||||||
|
|
@ -673,7 +673,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
||||||
public function testNodeChangedAt() : void
|
public function testNodeChangedAt() : void
|
||||||
{
|
{
|
||||||
$dirPath = __DIR__ . '/test';
|
$dirPath = __DIR__ . '/test';
|
||||||
$dir = new Directory($dirPath);
|
$dir = new Directory($dirPath);
|
||||||
|
|
||||||
self::assertTrue($dir->createNode());
|
self::assertTrue($dir->createNode());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -483,9 +483,9 @@ class FileTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
$testFile = __DIR__ . '/test.txt';
|
$testFile = __DIR__ . '/test.txt';
|
||||||
self::assertEquals([
|
self::assertEquals([
|
||||||
'dirname' => __DIR__,
|
'dirname' => __DIR__,
|
||||||
'basename' => 'test.txt',
|
'basename' => 'test.txt',
|
||||||
'filename' => 'test',
|
'filename' => 'test',
|
||||||
'extension' => 'txt',
|
'extension' => 'txt',
|
||||||
],
|
],
|
||||||
File::pathInfo($testFile)
|
File::pathInfo($testFile)
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,11 @@ declare(strict_types=1);
|
||||||
namespace phpOMS\tests\Utils\Converter;
|
namespace phpOMS\tests\Utils\Converter;
|
||||||
|
|
||||||
use phpOMS\Localization\ISO4217CharEnum;
|
use phpOMS\Localization\ISO4217CharEnum;
|
||||||
use phpOMS\Utils\Converter\Currency;
|
|
||||||
use phpOMS\Message\Http\HttpRequest;
|
use phpOMS\Message\Http\HttpRequest;
|
||||||
use phpOMS\Uri\HttpUri;
|
|
||||||
use phpOMS\Message\Http\RequestMethod;
|
use phpOMS\Message\Http\RequestMethod;
|
||||||
use phpOMS\Message\Http\Rest;
|
use phpOMS\Message\Http\Rest;
|
||||||
|
use phpOMS\Uri\HttpUri;
|
||||||
|
use phpOMS\Utils\Converter\Currency;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @testdox phpOMS\tests\Utils\Converter\CurrencyTest: Currency converter
|
* @testdox phpOMS\tests\Utils\Converter\CurrencyTest: Currency converter
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user