1
0
mirror of https://github.com/danog/phpseclib.git synced 2025-01-20 20:17:08 +01:00
phpseclib/tests/Unit/Net/SFTPStreamUnitTest.php

33 lines
893 B
PHP
Raw Normal View History

<?php
2022-02-16 20:25:59 -06:00
/**
* @author Andreas Fischer <bantu@phpbb.com>
* @copyright 2014 Andreas Fischer
* @license http://www.opensource.org/licenses/mit-license.html MIT License
*/
2022-06-04 10:31:21 -05:00
declare(strict_types=1);
namespace phpseclib3\Tests\Unit\Net;
use phpseclib3\Net\SFTP\Stream;
use phpseclib3\Tests\PhpseclibTestCase;
2014-12-09 17:31:41 -08:00
class SFTPStreamUnitTest extends PhpseclibTestCase
{
2022-06-04 10:31:21 -05:00
public function testRegisterWithoutArgument(): void
{
2014-12-09 17:31:41 -08:00
$this->assertTrue(Stream::register());
$this->assertContains('sftp', stream_get_wrappers());
$this->assertTrue(stream_wrapper_unregister('sftp'));
}
2022-06-04 10:31:21 -05:00
public function testRegisterWithArgument(): void
{
$protocol = 'sftptest';
2014-12-09 17:31:41 -08:00
$this->assertTrue(Stream::register($protocol));
$this->assertContains($protocol, stream_get_wrappers());
$this->assertTrue(stream_wrapper_unregister($protocol));
}
}