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

NumberFieldTest::testValueIsNumber()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
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