Passed
Push — maintenance-work ( b6a05d...a58b3b )
by Razvan
12:47
created

NumberFieldTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

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

1 Method

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