2014-06-26 22:21:55 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @author Andreas Fischer <bantu@phpbb.com>
|
|
|
|
* @copyright MMXIV Andreas Fischer
|
|
|
|
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
|
|
|
*/
|
|
|
|
|
|
|
|
class Unit_Net_SFTPStreamTest extends PhpseclibTestCase
|
|
|
|
{
|
2014-06-27 12:22:47 +00:00
|
|
|
public function testRegisterWithoutArgument()
|
2014-06-26 22:21:55 +00:00
|
|
|
{
|
2014-06-27 12:22:47 +00:00
|
|
|
$this->assertTrue(Net_SFTP_Stream::register());
|
2014-06-26 22:21:55 +00:00
|
|
|
$this->assertContains('sftp', stream_get_wrappers());
|
2014-06-27 12:22:47 +00:00
|
|
|
$this->assertTrue(stream_wrapper_unregister('sftp'));
|
2014-06-26 22:21:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testRegisterWithArgument()
|
|
|
|
{
|
2014-06-27 12:22:47 +00:00
|
|
|
$protocol = 'sftptest';
|
|
|
|
$this->assertTrue(Net_SFTP_Stream::register($protocol));
|
|
|
|
$this->assertContains($protocol, stream_get_wrappers());
|
|
|
|
$this->assertTrue(stream_wrapper_unregister($protocol));
|
2014-06-26 22:21:55 +00:00
|
|
|
}
|
|
|
|
}
|