Completed
Push — master ( f62226...8b6b73 )
by Stéphane
10s
created

FtpConfigurationTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 27
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testDefaults() 0 6 1
A testCommandsRequest() 0 8 1
A testCommandsPost() 0 8 1
1
<?php
2
/**
3
 * This file is part of the bee4/httpclient package.
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 *
7
 * @copyright Bee4 2015
8
 * @author  Stephane HULARD <[email protected]>
9
 * @package Bee4\Test\Transport\Configuration
10
 */
11
12
namespace Bee4\Test\Transport\Configuration;
13
14
use Bee4\Transport\Configuration\FtpConfiguration;
15
16
/**
17
 * @package Bee4\Test\Transport\Configuration
18
 */
19
class FtpConfigurationTest extends \PHPUnit_Framework_TestCase
20
{
21
    public function testDefaults()
22
    {
23
        $conf = new FtpConfiguration();
24
25
        $this->assertArrayHasKey('commands', $conf);
26
    }
27
28
    public function testCommandsRequest()
29
    {
30
        $conf = new FtpConfiguration();
31
32
        $this->assertNull($conf->commandsRequest());
33
        $conf->commandsRequest('a command');
34
        $this->assertEquals('a command', $conf->commandsRequest());
35
    }
36
37
    public function testCommandsPost()
38
    {
39
        $conf = new FtpConfiguration();
40
41
        $this->assertNull($conf->commandsPost());
42
        $conf->commandsPost('a command');
43
        $this->assertEquals('a command', $conf->commandsPost());
44
    }
45
}
46