/** * 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()); } }
/** * That that Adapter\Ftp::setPassiveMode() will return NULL if there * is no connection. */ public function test_ftp_set_passive_mode_returns_null_if_not_connected() { $anonymous_ftp_adapter = new Adapter\Ftp('ftp.kernel.org', 'anonymous', 'anonymous', ''); $this->assertNull($anonymous_ftp_adapter->setPassiveMode(true)); }