phpseclib/tests/Unit/Net/SFTPStreamUnitTest.php

31 lines
851 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
*/
use phpseclib3\Net\SFTP\Stream;
2014-12-10 01:31:41 +00:00
class Unit_Net_SFTPStreamUnitTest extends PhpseclibTestCase
{
public function testRegisterWithoutArgument()
{
2014-12-10 01:31:41 +00: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 01:31:41 +00:00
$this->assertTrue(Stream::register($protocol));
$this->assertContains($protocol, stream_get_wrappers());
$this->assertTrue(stream_wrapper_unregister($protocol));
}
}
class SFTPStreamUnitTest extends Unit_Net_SFTPStreamUnitTest
{
}