1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-12-14 18:16:26 +01:00
tgseclib/tests/Unit/Net/SFTPStreamTest.php

27 lines
780 B
PHP
Raw Normal View History

<?php
/**
* @author Andreas Fischer <bantu@phpbb.com>
* @copyright 2014 Andreas Fischer
* @license http://www.opensource.org/licenses/mit-license.html MIT License
*/
2014-12-10 02:31:41 +01:00
use phpseclib\Net\SFTP\Stream;
class Unit_Net_SFTPStreamTest extends PhpseclibTestCase
{
public function testRegisterWithoutArgument()
{
2014-12-10 02:31:41 +01:00
$this->assertTrue(Stream::register());
$this->assertContains('sftp', stream_get_wrappers());
$this->assertTrue(stream_wrapper_unregister('sftp'));
}
public function testRegisterWithArgument()
{
$protocol = 'sftptest';
2014-12-10 02:31:41 +01:00
$this->assertTrue(Stream::register($protocol));
$this->assertContains($protocol, stream_get_wrappers());
$this->assertTrue(stream_wrapper_unregister($protocol));
}
}