EntryTest::testFullMethodsDataEntry()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 11
rs 9.4285
cc 1
eloc 8
nc 1
nop 0
1
<?php
2
3
namespace CarlosIO\Geckoboard\Tests\Data;
4
5
use CarlosIO\Geckoboard\Data\Entry;
6
7
class EntryTest extends \PHPUnit_Framework_TestCase
8
{
9
    public function testFullMethodsDataEntry()
10
    {
11
        $entry = new Entry();
12
        $entry
13
            ->setValue(100)
14
            ->setPrefix('EUR')
15
            ->setText('Step 1');
16
17
        $json = json_encode($entry->toArray());
18
        $this->assertEquals('{"text":"Step 1","value":100,"prefix":"EUR"}', $json);
19
    }
20
}
21