Passed
Pull Request — master (#103)
by Razvan
15:39 queued 12:47
created

NumberFieldTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 12
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