Passed
Push — master ( edb799...f409da )
by Petr
07:56
created

DummyTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2
1
<?php
2
3
namespace ProtocolsTests;
4
5
6
use CommonTestClass;
7
use kalanis\RemoteRequest\Protocols\Dummy;
8
9
10
class DummyTest extends CommonTestClass
11
{
12
    public function testQuerySimple(): void
13
    {
14
        $libValue = new Dummy\Query();
15
        $this->assertNull($libValue->maxLength);
16
        $this->assertEquals('', $libValue->body);
17
        $libValue->body = 'qwertzuiop';
18
        $libValue->setExpectedAnswerSize(55);
19
        $this->assertEquals(55, $libValue->getMaxAnswerLength());
20
        $libValue->maxLength = null;
21
        $this->assertNull($libValue->getMaxAnswerLength());
22
    }
23
24
    public function testAnswerSimple(): void
25
    {
26
        $libValue = new Dummy\Answer();
27
        $this->assertEmpty($libValue->getContent());
28
        $libValue->setResponse(static::stringToResource('ksdjfasdfgasdjfhsdkf'));
29
        $this->assertEquals('ksdjfasdfgasdjfhsdkf', $libValue->getContent());
30
    }
31
}
32