phpseclib/tests/Unit/Net/SFTPStreamUnitTest.php
Jack Worman 574953061a PSR4 for tests and added fall-through for switches
PSR4 for tests and added fall-through for switches
2022-02-27 01:26:31 -06:00

31 lines
855 B
PHP

<?php
/**
* @author Andreas Fischer <bantu@phpbb.com>
* @copyright 2014 Andreas Fischer
* @license http://www.opensource.org/licenses/mit-license.html MIT License
*/
namespace phpseclib3\Tests\Unit\Net;
use phpseclib3\Net\SFTP\Stream;
use phpseclib3\Tests\PhpseclibTestCase;
class SFTPStreamUnitTest extends PhpseclibTestCase
{
public function testRegisterWithoutArgument()
{
$this->assertTrue(Stream::register());
$this->assertContains('sftp', stream_get_wrappers());
$this->assertTrue(stream_wrapper_unregister('sftp'));
}
public function testRegisterWithArgument()
{
$protocol = 'sftptest';
$this->assertTrue(Stream::register($protocol));
$this->assertContains($protocol, stream_get_wrappers());
$this->assertTrue(stream_wrapper_unregister($protocol));
}
}