ShopCountryTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testField() 0 7 1
1
<?php
2
3
namespace SilverShop\Tests\ORM\FieldType;
4
5
use SilverShop\ORM\FieldType\ShopCountry;
6
use SilverStripe\Dev\SapphireTest;
7
8
class ShopCountryTest extends SapphireTest
9
{
10
    public function testField()
11
    {
12
        $field = new ShopCountry("Country");
13
        $field->setValue("ABC");
14
        $this->assertEquals("ABC", $field->forTemplate());
15
        $field->setValue("NZ");
16
        $this->assertEquals("New Zealand", $field->forTemplate());
17
    }
18
}
19