2014-06-27 00:21:55 +02:00
|
|
|
<?php
|
2022-02-17 03:25:59 +01:00
|
|
|
|
2014-06-27 00:21:55 +02:00
|
|
|
/**
|
|
|
|
* @author Andreas Fischer <bantu@phpbb.com>
|
2014-12-10 00:02:44 +01:00
|
|
|
* @copyright 2014 Andreas Fischer
|
2014-06-27 00:21:55 +02:00
|
|
|
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
|
|
|
*/
|
|
|
|
|
2019-11-07 06:41:40 +01:00
|
|
|
use phpseclib3\Net\SFTP\Stream;
|
2014-12-10 02:31:41 +01:00
|
|
|
|
2020-12-12 22:11:04 +01:00
|
|
|
class Unit_Net_SFTPStreamUnitTest extends PhpseclibTestCase
|
2014-06-27 00:21:55 +02:00
|
|
|
{
|
2014-06-27 14:22:47 +02:00
|
|
|
public function testRegisterWithoutArgument()
|
2014-06-27 00:21:55 +02:00
|
|
|
{
|
2014-12-10 02:31:41 +01:00
|
|
|
$this->assertTrue(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';
|
2014-12-10 02:31:41 +01:00
|
|
|
$this->assertTrue(Stream::register($protocol));
|
2014-06-27 14:22:47 +02:00
|
|
|
$this->assertContains($protocol, stream_get_wrappers());
|
|
|
|
$this->assertTrue(stream_wrapper_unregister($protocol));
|
2014-06-27 00:21:55 +02:00
|
|
|
}
|
|
|
|
}
|