Example #1
0
 public function testRm()
 {
     // Configure the stub.
     $stub = $this->getMock('Zikula\\Component\\FileSystem\\Facade\\FtpFacade');
     $stub->expects($this->any())->method('delete')->will($this->returnValue(true));
     $this->ftp->setDriver($stub);
     $this->assertEquals(true, $this->ftp->rm(1, 2));
     // Configure the stub.
     $stub = $this->getMock('Zikula\\Component\\FileSystem\\Facade\\FtpFacade');
     $stub->expects($this->any())->method('delete')->will($this->returnValue(false));
     $this->ftp->setDriver($stub);
     $this->assertEquals(false, $this->ftp->rm(1, 2));
 }