当前位置: 首页>>代码示例>>PHP>>正文


PHP Ftp::getTimeout方法代码示例

本文整理汇总了PHP中Ftp::getTimeout方法的典型用法代码示例。如果您正苦于以下问题:PHP Ftp::getTimeout方法的具体用法?PHP Ftp::getTimeout怎么用?PHP Ftp::getTimeout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ftp的用法示例。


在下文中一共展示了Ftp::getTimeout方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testInstantiable

 public function testInstantiable()
 {
     $adapter = new Ftp($this->options);
     $this->assertEquals('example.org', $adapter->getHost());
     $this->assertEquals(40, $adapter->getPort());
     $this->assertEquals(true, $adapter->getSsl());
     $this->assertEquals(35, $adapter->getTimeout());
     $this->assertEquals('/somewhere/', $adapter->getRoot());
     $this->assertEquals(0777, $adapter->getPermPublic());
     $this->assertEquals(00, $adapter->getPermPrivate());
     $this->assertEquals(false, $adapter->getPassive());
     $this->assertEquals('user', $adapter->getUsername());
     $this->assertEquals('password', $adapter->getPassword());
     $listing = $adapter->listContents('', true);
     $this->assertInternalType('array', $listing);
     $this->assertFalse($adapter->has('not.found'));
     $this->assertFalse($adapter->getVisibility('not.found'));
     $this->assertFalse($adapter->getSize('not.found'));
     $this->assertFalse($adapter->getMimetype('not.found'));
     $this->assertFalse($adapter->getTimestamp('not.found'));
     $this->assertFalse($adapter->write('write.fail', 'contents'));
     $this->assertFalse($adapter->writeStream('write.fail', tmpfile()));
     $this->assertFalse($adapter->update('write.fail', 'contents'));
     $this->assertFalse($adapter->setVisibility('chmod.fail', 'private'));
     $this->assertTrue($adapter->rename('a', 'b'));
     $this->assertTrue($adapter->delete('a'));
     $result = $adapter->read('something.txt');
     $this->assertEquals('contents', $result['contents']);
     $result = $adapter->getMimetype('something.txt');
     $this->assertEquals('text/plain', $result['mimetype']);
     $this->assertFalse($adapter->createDir('some.nested/mkdir.fail'));
     $this->assertInternalType('array', $adapter->write('unknowndir/file.txt', 'contents', 'public'));
     $this->assertInternalType('array', $adapter->writeStream('unknowndir/file.txt', tmpfile(), 'public'));
     $adapter->deleteDir('');
     $this->assertInternalType('array', $adapter->getTimestamp('some/file.ext'));
 }
开发者ID:robertdamoc,项目名称:flysystem,代码行数:36,代码来源:FtpTests.php


注:本文中的Ftp::getTimeout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。