Completed
Push — master ( 1f0278...22c246 )
by
unknown
12s
created

KeyTest::testGetKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Moip\Tests\Resource;
4
5
use Moip\Tests\TestCase;
6
7
class KeyTest extends TestCase
8
{
9
    public function testGetKey()
10
    {
11
        $this->mockHttpSession($this->body_keys);
0 ignored issues
show
Bug introduced by
The property body_keys does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
12
13
        $keys = $this->moip->keys()->get();
14
15
        $this->assertNotNull($keys->getBasicAuth()->token);
16
        $this->assertNotNull($keys->getBasicAuth()->secret);
17
        $this->assertNotNull($keys->getEncryption());
18
    }
19
}
20