mirror of
https://github.com/danog/phpseclib.git
synced 2024-11-30 04:39:21 +01:00
Merge branch 'master' of https://github.com/phpseclib/phpseclib
This commit is contained in:
commit
eefcf9c941
@ -42,8 +42,9 @@ class Functional_Net_SCPSSH2UserStoryTest extends PhpseclibFunctionalTestCase
|
|||||||
public function testConstructor($ssh)
|
public function testConstructor($ssh)
|
||||||
{
|
{
|
||||||
$scp = new SCP($ssh);
|
$scp = new SCP($ssh);
|
||||||
$this->assertTrue(
|
$this->assertInternalType(
|
||||||
is_object($scp),
|
'object',
|
||||||
|
$scp,
|
||||||
'Could not construct \phpseclib\Net\SCP object.'
|
'Could not construct \phpseclib\Net\SCP object.'
|
||||||
);
|
);
|
||||||
return $scp;
|
return $scp;
|
||||||
|
@ -22,7 +22,7 @@ class Functional_Net_SFTPStreamTest extends Functional_Net_SFTPTestCase
|
|||||||
'sftp' => ['session' => $this->sftp],
|
'sftp' => ['session' => $this->sftp],
|
||||||
]);
|
]);
|
||||||
$fp = fopen($this->buildUrl('fooo.txt'), 'wb', false, $context);
|
$fp = fopen($this->buildUrl('fooo.txt'), 'wb', false, $context);
|
||||||
$this->assertTrue(is_resource($fp));
|
$this->assertInternalType('resource', $fp);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
$this->assertSame(0, $this->sftp->size('fooo.txt'));
|
$this->assertSame(0, $this->sftp->size('fooo.txt'));
|
||||||
}
|
}
|
||||||
@ -39,7 +39,7 @@ class Functional_Net_SFTPStreamTest extends Functional_Net_SFTPTestCase
|
|||||||
fputs($fp, 'zzzz');
|
fputs($fp, 'zzzz');
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
$this->assertTrue(in_array('te#st.txt', $this->sftp->nlist()));
|
$this->assertContains('te#st.txt', $this->sftp->nlist());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,8 +29,9 @@ class Functional_Net_SFTPUserStoryTest extends PhpseclibFunctionalTestCase
|
|||||||
{
|
{
|
||||||
$sftp = new SFTP($this->getEnv('SSH_HOSTNAME'));
|
$sftp = new SFTP($this->getEnv('SSH_HOSTNAME'));
|
||||||
|
|
||||||
$this->assertTrue(
|
$this->assertInternalType(
|
||||||
is_object($sftp),
|
'object',
|
||||||
|
$sftp,
|
||||||
'Could not construct NET_SFTP object.'
|
'Could not construct NET_SFTP object.'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -14,8 +14,9 @@ class Functional_Net_SSH2Test extends PhpseclibFunctionalTestCase
|
|||||||
{
|
{
|
||||||
$ssh = new SSH2($this->getEnv('SSH_HOSTNAME'));
|
$ssh = new SSH2($this->getEnv('SSH_HOSTNAME'));
|
||||||
|
|
||||||
$this->assertTrue(
|
$this->assertInternalType(
|
||||||
is_object($ssh),
|
'object',
|
||||||
|
$ssh,
|
||||||
'Could not construct NET_SSH2 object.'
|
'Could not construct NET_SSH2 object.'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ class Unit_File_ANSITest extends PhpseclibTestCase
|
|||||||
$screen = $ansi->getScreen();
|
$screen = $ansi->getScreen();
|
||||||
|
|
||||||
$lines = explode("\r\n", $screen);
|
$lines = explode("\r\n", $screen);
|
||||||
$this->assertSame(24, count($lines));
|
$this->assertCount(24, $lines);
|
||||||
$this->assertSame(str_repeat('z', 80), $lines[22]);
|
$this->assertSame(str_repeat('z', 80), $lines[22]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user