CommandGetxmlTest   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 2
dl 0
loc 34
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getCommand() 0 4 1
A getRawTelnetResponse() 0 4 1
A getExpectedResponseText() 0 4 1
A getExpectedArgumentText() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of graze/dynamark3-client.
5
 *
6
 * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 * @license https://github.com/graze/dynamark3-client/blob/master/LICENSE.md
12
 * @link https://github.com/graze/dynamark3-client
13
 */
14
15
namespace Graze\Dynamark3Client\Test\Unit\Command;
16
17
use \Graze\Dynamark3Client\Test\AbstractCommandTestCase;
18
use \Graze\Dynamark3Client\Command\CommandGetxml;
19
use \Graze\Dynamark3Client\Dynamark3Constants;
20
21
class CommandGetxmlTest extends AbstractCommandTestCase
22
{
23
    /**
24
     * @return \Graze\Dynamark3Client\Command\CommandInterface
25
     */
26
    protected function getCommand()
27
    {
28
        return new CommandGetxml();
29
    }
30
31
    /**
32
     * @return string
33
     */
34
    protected function getRawTelnetResponse()
35
    {
36
        return 'RESULT GETXML <xml><node>cool xml</node></xml>' . Dynamark3Constants::LINE_ENDING;
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    protected function getExpectedResponseText()
43
    {
44
        return '<xml><node>cool xml</node></xml>';
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    protected function getExpectedArgumentText()
51
    {
52
        return ' "a" "1"';
53
    }
54
}
55