fix ftp port and code content

This commit is contained in:
Dennis Eichhorn 2023-05-19 14:45:32 +00:00
parent 4d9f4aa241
commit 96ac1d9dff
6 changed files with 19 additions and 19 deletions

View File

@ -1 +1 @@
ì ÎÅÅ'M”«ã§„F&A„ª“jŠ4ñÚ{,ðý<C3B0>ëe=¼uáÖQþ[G‰#HƒX
+³¿W ?Å?f#WïÊ<C3AF>ÑV©Ý²…A —…ü ´Á=QØ8T##û±åde:{_¿Ó¤¼

View File

@ -24,7 +24,7 @@ use phpOMS\Uri\HttpUri;
*/
final class DirectoryTest extends \PHPUnit\Framework\TestCase
{
public const BASE = 'ftp://test:123456@127.0.0.1:20';
public const BASE = 'ftp://test:123456@127.0.0.1:21';
private static $con = null;
@ -39,17 +39,17 @@ final class DirectoryTest extends \PHPUnit\Framework\TestCase
}
try {
$mkdir = \ftp_mkdir(self::$con, '0xFF');
\ftp_rmdir(self::$con, '0xFF');
$mkdir = \ftp_mkdir(self::$con, __DIR__ . '/0xFF');
\ftp_rmdir(self::$con, __DIR__ . '/0xFF');
$f = \fopen('php://memory', 'r+');
\fwrite($f, '0x00');
\fwrite($f, __DIR__ . '/0x00');
\rewind($f);
$put = \ftp_fput(self::$con, '0x00', $f);
$put = \ftp_fput(self::$con, __DIR__ . '/0x00', $f);
\fclose($f);
\ftp_delete(self::$con, '0x00');
\ftp_delete(self::$con, __DIR__ . '/0x00');
if (!$mkdir || !$put) {
throw new \Exception();

View File

@ -26,7 +26,7 @@ use phpOMS\Uri\HttpUri;
*/
final class FileTest extends \PHPUnit\Framework\TestCase
{
public const BASE = 'ftp://test:123456@127.0.0.1:20';
public const BASE = 'ftp://test:123456@127.0.0.1:21';
private static $con = null;
@ -41,17 +41,17 @@ final class FileTest extends \PHPUnit\Framework\TestCase
}
try {
$mkdir = \ftp_mkdir(self::$con, '0xFF');
\ftp_rmdir(self::$con, '0xFF');
$mkdir = \ftp_mkdir(self::$con, __DIR__ . '/0xFF');
\ftp_rmdir(self::$con, __DIR__ . '/0xFF');
$f = \fopen('php://memory', 'r+');
\fwrite($f, '0x00');
\fwrite($f, __DIR__ . '/0x00');
\rewind($f);
$put = \ftp_fput(self::$con, '0x00', $f);
$put = \ftp_fput(self::$con, __DIR__ . '/0x00', $f);
\fclose($f);
\ftp_delete(self::$con, '0x00');
\ftp_delete(self::$con, __DIR__ . '/0x00');
if (!$mkdir || !$put) {
throw new \Exception();

View File

@ -27,7 +27,7 @@ use phpOMS\Uri\HttpUri;
*/
final class FtpStorageTest extends \PHPUnit\Framework\TestCase
{
public const BASE = 'ftp://test:123456@127.0.0.1:20';
public const BASE = 'ftp://test:123456@127.0.0.1:21';
private static $con = null;
@ -42,17 +42,17 @@ final class FtpStorageTest extends \PHPUnit\Framework\TestCase
}
try {
$mkdir = \ftp_mkdir(self::$con, '0xFF');
\ftp_rmdir(self::$con, '0xFF');
$mkdir = \ftp_mkdir(self::$con, __DIR__ . '/0xFF');
\ftp_rmdir(self::$con, __DIR__ . '/0xFF');
$f = \fopen('php://memory', 'r+');
\fwrite($f, '0x00');
\fwrite($f, __DIR__ . '/0x00');
\rewind($f);
$put = \ftp_fput(self::$con, '0x00', $f);
$put = \ftp_fput(self::$con, __DIR__ . '/0x00', $f);
\fclose($f);
\ftp_delete(self::$con, '0x00');
\ftp_delete(self::$con, __DIR__ . '/0x00');
if (!$mkdir || !$put) {
throw new \Exception();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

After

Width:  |  Height:  |  Size: 400 B