Passed
Pull Request — master (#49)
by Robbie
03:10
created

ResultConditionsFieldTest   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 testGetMatchOptionsDataStructure() 0 7 1
1
<?php
2
3
namespace SilverStripe\CKANRegistry\Tests\Forms;
4
5
use SilverStripe\CKANRegistry\Forms\ResultConditionsField;
6
use SilverStripe\Dev\SapphireTest;
7
8
class ResultConditionsFieldTest extends SapphireTest
9
{
10
    public function testGetMatchOptionsDataStructure()
11
    {
12
        $result = ResultConditionsField::getMatchOptions();
13
14
        $this->assertNotEmpty($result, 'Match options should be returned');
15
        $this->assertArrayHasKey('value', $result[0], 'Unexpected data structure returned');
16
        $this->assertArrayHasKey('title', $result[0], 'Unexpected data structure returned');
17
    }
18
}
19