Skip to content

Commit 5181e19

Browse files
committed
Slight fixes
1 parent 7bb0f4e commit 5181e19

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

tests/Config/FtpConfigTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
use Lazzard\FtpClient\Config\FtpConfig;
66
use Lazzard\FtpClient\Exception\ConfigException;
77
use Lazzard\FtpClient\Tests\ConnectionHelper;
8+
use PHPUnit\Framework\TestCase;
89

9-
class FtpConfigTest extends \PHPUnit_Framework_TestCase
10+
class FtpConfigTest extends TestCase
1011
{
1112
public function test__constructor()
1213
{

tests/Connection/FtpSSLConnectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function testIfOpensslLoadedAndFtpSslConnectFunctionExists()
2020
}
2121
}
2222

23-
public function testIfOpensslLoadedAndFtpSslConnectFunctionNotExists()
23+
public function testIfOpensslLoadedOrFtpSslConnectFunctionNotExists()
2424
{
2525
if (!extension_loaded('openssl') || !function_exists('ftp_ssl_connect')) {
2626
$this->setExpectedException(ConnectionException::class);

tests/FtpClientTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
use Lazzard\FtpClient\Exception\FtpClientException;
77
use Lazzard\FtpClient\FtpClient;
88
use Lazzard\FtpClient\FtpWrapper;
9+
use PHPUnit\Framework\TestCase;
910

10-
class FtpClientTest extends \PHPUnit_Framework_TestCase
11+
class FtpClientTest extends TestCase
1112
{
1213
protected $testFile = INITIAL_DIR . '/lazzard_ftp_client_test_file.txt';
1314
protected $testDir = INITIAL_DIR . '/lazzard_ftp_client_test_directory';
@@ -308,8 +309,10 @@ public function testCopyFromLocalWithDirectorySource()
308309
$tempDirPah = sys_get_temp_dir() . "/$testDir";
309310
$tempFile = "$tempDirPah/$testFile";
310311

311-
if (!mkdir($tempDirPah) || file_put_contents($tempFile, 'hello world!!') === false) {
312-
self::markTestSkipped();
312+
if (!file_exists($tempDirPah)) {
313+
if (!mkdir($tempDirPah, 0777) || file_put_contents($tempFile, 'hello world!!') === false) {
314+
self::markTestSkipped();
315+
}
313316
}
314317

315318
$this->assertTrue($this->getFtpClientInstance()->copyFromLocal($tempDirPah, INITIAL_DIR));

0 commit comments

Comments
 (0)