Completed
Push — master ( 36af8e...9a1b95 )
by Sebastian
01:54
created

ClientTest::testList()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 9
nc 1
nop 0
dl 0
loc 14
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of SebastianFeldmann\Ftp.
4
 *
5
 * (c) Sebastian Feldmann <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace SebastianFeldmann\Ftp;
11
12
use PHPUnit\Framework\TestCase;
13
14
/**
15
 * Class ClientTest
16
 *
17
 * @package SebastianFeldmann\Ftp
18
 */
19
class ClientTest extends TestCase
20
{
21
    /**
22
     * Tests Client::ls
23
     */
24
    public function testList()
25
    {
26
        $client = new Client('ftp://foo:[email protected]');
27
        $list   = $client->ls();
28
29
        $this->assertTrue($list[0]->isFile());
30
        $this->assertEquals('foo.txt', $list[0]->getFilename());
31
        $this->assertEquals(100, $list[0]->getSize());
32
33
        $this->assertTrue($list[1]->isFile());
34
        $this->assertEquals('bar.txt', $list[1]->getFilename());
35
36
        $this->assertFalse($list[2]->isFile());
37
        $this->assertEquals('fiz', $list[2]->getFilename());
38
    }
39
}
40