NumberFieldTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 9
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testValueIsNumber() 0 7 1
1
<?php
2
3
namespace Passbook\Tests\Pass;
4
5
use Passbook\Pass\NumberField;
6
use PHPUnit\Framework\TestCase;
7
8
class NumberFieldTest extends TestCase
9
{
10
    public function testValueIsNumber()
11
    {
12
        $field = new NumberField('price', '12.34');
13
        $this->assertIsFloat($field->getValue());
14
15
        $field = new NumberField('price', '12');
16
        $this->assertIsInt($field->getValue());
17
    }
18
}
19