|
@@ 140-148 (lines=9) @@
|
| 137 |
|
/** |
| 138 |
|
* @covers Koch\Request\FTP::createDirectory |
| 139 |
|
*/ |
| 140 |
|
public function testCreateDirectory() |
| 141 |
|
{ |
| 142 |
|
$this->object->expects($this->any())->method('createDirectory')->will($this->returnValue(true)); |
| 143 |
|
$this->object->expects($this->any())->method('isDir')->will($this->returnValue(true)); |
| 144 |
|
|
| 145 |
|
$this->object->createDirectory('dir1/dir2/dir3'); |
| 146 |
|
|
| 147 |
|
$this->assertTrue($this->object->isDir('dir1/dir2/dir3')); |
| 148 |
|
} |
| 149 |
|
|
| 150 |
|
/** |
| 151 |
|
* @covers Koch\Request\FTP::deleteDirectory |
|
@@ 206-215 (lines=10) @@
|
| 203 |
|
/** |
| 204 |
|
* @covers Koch\Request\FTP::isFile |
| 205 |
|
*/ |
| 206 |
|
public function testIsFile() |
| 207 |
|
{ |
| 208 |
|
$this->object->expects($this->once())->method('upload')->will($this->returnValue(true)); |
| 209 |
|
$this->object->expects($this->any())->method('isFile')->will($this->returnValue(true)); |
| 210 |
|
|
| 211 |
|
$result = $this->object->upload('testfile.txt', 'dir1/testfile.txt'); |
| 212 |
|
|
| 213 |
|
$this->assertTrue($result); |
| 214 |
|
$this->assertTrue($this->object->isFile('dir1/testfile.txt')); |
| 215 |
|
} |
| 216 |
|
|
| 217 |
|
/** |
| 218 |
|
* @covers Koch\Request\FTP::fileSize |
|
@@ 235-244 (lines=10) @@
|
| 232 |
|
* |
| 233 |
|
* @todo Implement testIsDir(). |
| 234 |
|
*/ |
| 235 |
|
public function testIsDir() |
| 236 |
|
{ |
| 237 |
|
$this->object->expects($this->any())->method('createDirectory')->will($this->returnValue(true)); |
| 238 |
|
$this->object->expects($this->any())->method('isDir')->will($this->returnValue(true)); |
| 239 |
|
|
| 240 |
|
$result = $this->object->createDirectory('dir1'); |
| 241 |
|
|
| 242 |
|
$this->assertTrue($result); |
| 243 |
|
$this->assertTrue($this->object->isDir('dir1')); |
| 244 |
|
} |
| 245 |
|
|
| 246 |
|
/** |
| 247 |
|
* @covers Koch\Request\FTP::getDirectoryContent |