diff --git a/tests/System/File/Ftp/DirectoryTest.php b/tests/System/File/Ftp/DirectoryTest.php index ba2acd1af..6d9b105ab 100755 --- a/tests/System/File/Ftp/DirectoryTest.php +++ b/tests/System/File/Ftp/DirectoryTest.php @@ -482,7 +482,7 @@ final class DirectoryTest extends \PHPUnit\Framework\TestCase public function testStaticOwner() : void { $dirTestPath = __DIR__ . '/dirtest'; - self::assertNotEmpty(Directory::owner(self::$con, $dirTestPath)); + self::assertTrue(!empty(Directory::owner(self::$con, $dirTestPath))); } /** @@ -823,7 +823,7 @@ final class DirectoryTest extends \PHPUnit\Framework\TestCase { $dir = new Directory(new HttpUri(self::BASE . __DIR__ . '/dirtest'), true, self::$con); - self::assertNotEmpty($dir->getOwner()); + self::assertTrue(!empty($dir->getOwner())); } /** diff --git a/tests/System/File/Ftp/FileTest.php b/tests/System/File/Ftp/FileTest.php index 1d9f150c9..1a3e82462 100755 --- a/tests/System/File/Ftp/FileTest.php +++ b/tests/System/File/Ftp/FileTest.php @@ -615,7 +615,7 @@ final class FileTest extends \PHPUnit\Framework\TestCase public function testStaticOwner() : void { $dirTestPath = __DIR__ . '/dirtest/test.txt'; - self::assertNotEmpty(File::owner(self::$con, $dirTestPath)); + self::assertTrue(!empty(File::owner(self::$con, $dirTestPath))); } /** @@ -658,15 +658,13 @@ final class FileTest extends \PHPUnit\Framework\TestCase } /** - * @testdox Reading the content of a none-existing file throws a PathException + * @testdox Reading the content of a none-existing file returns an empty string * @covers phpOMS\System\File\Ftp\File * @group framework */ public function testInvalidGetPath() : void { - $this->expectException(\phpOMS\System\File\PathException::class); - - File::get(self::$con, __DIR__ . '/invalid.txt'); + self::assertEquals('', File::get(self::$con, __DIR__ . '/invalid.txt')); } /** @@ -855,7 +853,7 @@ final class FileTest extends \PHPUnit\Framework\TestCase $testFile = __DIR__ . '/dirtest/test.txt'; $file = new File(new HttpUri(self::BASE . $testFile), self::$con); - self::assertNotEmpty($file->getOwner()); + self::assertTrue(!empty($file->getOwner())); } /** diff --git a/tests/System/File/Ftp/FtpStorageTest.php b/tests/System/File/Ftp/FtpStorageTest.php index 99ee4b44a..f9f0e9571 100755 --- a/tests/System/File/Ftp/FtpStorageTest.php +++ b/tests/System/File/Ftp/FtpStorageTest.php @@ -1005,15 +1005,13 @@ final class FtpStorageTest extends \PHPUnit\Framework\TestCase } /** - * @testdox Reading the content of a none-existing file throws a PathException + * @testdox Reading the content of a none-existing file returns an empty result * @covers phpOMS\System\File\Ftp\FtpStorage * @group framework */ public function testInvalidGetPathFile() : void { - $this->expectException(\phpOMS\System\File\PathException::class); - - FtpStorage::get(__DIR__ . '/invalid.txt'); + self::assertEquals('', FtpStorage::get(__DIR__ . '/invalid.txt')); } /**