Exemplo n.º 1
0
 /**
  * Test that ftp.kernel.org allows anonymous login's
  */
 public function test_ftp_authenticate_returns_true()
 {
     $anonymous_ftp_adapter = new Adapter\Ftp('ftp.kernel.org', 'anonymous', 'anonymous', '');
     $ret = $anonymous_ftp_adapter->authenticate();
     $this->assertTrue($ret);
     if ($ret === true) {
         $this->assertTrue($anonymous_ftp_adapter->setPassiveMode(true));
         $this->assertTrue($anonymous_ftp_adapter->setActiveMode());
     }
 }
Exemplo n.º 2
0
 /**
  * That that Adapter\Ftp::setActiveMode() will return NULL if there
  * is no connection.
  */
 public function test_ftp_set_active_mode_returns_null_if_not_connected()
 {
     $anonymous_ftp_adapter = new Adapter\Ftp('ftp.kernel.org', 'anonymous', 'anonymous', '');
     $this->assertNull($anonymous_ftp_adapter->setActiveMode());
 }