2014-06-27 00:21:55 +02: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 14:22:47 +02:00
|
|
|
public function testRegisterWithoutArgument()
|
2014-06-27 00:21:55 +02:00
|
|
|
{
|
2014-06-27 14:22:47 +02:00
|
|
|
$this->assertTrue(Net_SFTP_Stream::register());
|
2014-06-27 00:21:55 +02:00
|
|
|
$this->assertContains('sftp', stream_get_wrappers());
|
2014-06-27 14:22:47 +02:00
|
|
|
$this->assertTrue(stream_wrapper_unregister('sftp'));
|
2014-06-27 00:21:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testRegisterWithArgument()
|
|
|
|
{
|
2014-06-27 14:22:47 +02:00
|
|
|
$protocol = 'sftptest';
|
|
|
|
$this->assertTrue(Net_SFTP_Stream::register($protocol));
|
|
|
|
$this->assertContains($protocol, stream_get_wrappers());
|
|
|
|
$this->assertTrue(stream_wrapper_unregister($protocol));
|
2014-06-27 00:21:55 +02:00
|
|
|
}
|
|
|
|
}
|