mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-14 19:18:41 +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;
|
||||
|
||||
public static function with($con)
|
||||
public static function with($con) : void
|
||||
{
|
||||
self::$con = $con;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ use phpOMS\Dispatcher\Dispatcher;
|
|||
use phpOMS\Message\Http\HttpRequest;
|
||||
use phpOMS\Module\ModuleManager;
|
||||
use phpOMS\Router\WebRouter;
|
||||
use phpOMS\System\File\Local\Directory;
|
||||
use phpOMS\Uri\HttpUri;
|
||||
|
||||
require_once __DIR__ . '/../Autoloader.php';
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
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
|
||||
|
|
@ -503,18 +503,18 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
|||
public function testList() : void
|
||||
{
|
||||
$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([
|
||||
'sub',
|
||||
'test.txt'
|
||||
'test.txt',
|
||||
], $dir->getList());
|
||||
}
|
||||
|
||||
public function testNodeOutput() : void
|
||||
{
|
||||
$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'));
|
||||
}
|
||||
|
|
@ -616,7 +616,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
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'));
|
||||
|
||||
self::assertTrue(\file_exists(__DIR__ . '/nodedir'));
|
||||
|
|
@ -649,7 +649,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
|||
public function testNodeCreatedAt() : void
|
||||
{
|
||||
$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());
|
||||
|
||||
|
|
@ -662,7 +662,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
|||
public function testNodeChangedAt() : void
|
||||
{
|
||||
$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());
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ declare(strict_types=1);
|
|||
namespace phpOMS\tests\System\File\Ftp;
|
||||
|
||||
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\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
|
||||
|
|
|
|||
|
|
@ -514,18 +514,18 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
|||
public function testList() : void
|
||||
{
|
||||
$dirTestPath = __DIR__ . '/dirtest';
|
||||
$dir = new Directory($dirTestPath);
|
||||
$dir = new Directory($dirTestPath);
|
||||
|
||||
self::assertEquals([
|
||||
'sub',
|
||||
'test.txt'
|
||||
'test.txt',
|
||||
], $dir->getList());
|
||||
}
|
||||
|
||||
public function testNodeOutput() : void
|
||||
{
|
||||
$dirTestPath = __DIR__ . '/dirtest';
|
||||
$dir = new Directory($dirTestPath);
|
||||
$dir = new Directory($dirTestPath);
|
||||
|
||||
self::assertInstanceOf(Directory::class, $dir->getNode('sub'));
|
||||
}
|
||||
|
|
@ -627,7 +627,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
public function testNodeArraySet() : void
|
||||
{
|
||||
$dir = new Directory(__DIR__);
|
||||
$dir = new Directory(__DIR__);
|
||||
$dir[] = new Directory(__DIR__ . '/nodedir');
|
||||
|
||||
self::assertTrue(\file_exists(__DIR__ . '/nodedir'));
|
||||
|
|
@ -660,7 +660,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
|||
public function testNodeCreatedAt() : void
|
||||
{
|
||||
$dirPath = __DIR__ . '/test';
|
||||
$dir = new Directory($dirPath);
|
||||
$dir = new Directory($dirPath);
|
||||
|
||||
self::assertTrue($dir->createNode());
|
||||
|
||||
|
|
@ -673,7 +673,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
|
|||
public function testNodeChangedAt() : void
|
||||
{
|
||||
$dirPath = __DIR__ . '/test';
|
||||
$dir = new Directory($dirPath);
|
||||
$dir = new Directory($dirPath);
|
||||
|
||||
self::assertTrue($dir->createNode());
|
||||
|
||||
|
|
|
|||
|
|
@ -483,9 +483,9 @@ class FileTest extends \PHPUnit\Framework\TestCase
|
|||
{
|
||||
$testFile = __DIR__ . '/test.txt';
|
||||
self::assertEquals([
|
||||
'dirname' => __DIR__,
|
||||
'basename' => 'test.txt',
|
||||
'filename' => 'test',
|
||||
'dirname' => __DIR__,
|
||||
'basename' => 'test.txt',
|
||||
'filename' => 'test',
|
||||
'extension' => 'txt',
|
||||
],
|
||||
File::pathInfo($testFile)
|
||||
|
|
|
|||
|
|
@ -15,11 +15,11 @@ declare(strict_types=1);
|
|||
namespace phpOMS\tests\Utils\Converter;
|
||||
|
||||
use phpOMS\Localization\ISO4217CharEnum;
|
||||
use phpOMS\Utils\Converter\Currency;
|
||||
use phpOMS\Message\Http\HttpRequest;
|
||||
use phpOMS\Uri\HttpUri;
|
||||
use phpOMS\Message\Http\RequestMethod;
|
||||
use phpOMS\Message\Http\Rest;
|
||||
use phpOMS\Uri\HttpUri;
|
||||
use phpOMS\Utils\Converter\Currency;
|
||||
|
||||
/**
|
||||
* @testdox phpOMS\tests\Utils\Converter\CurrencyTest: Currency converter
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user