Passed
Push — sheepy/introspection ( 851cdd...69e16c )
by Marco
06:22
created

QueryRecordTest::testFindOrCreate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
4
namespace Firesphere\SolrSearch\Tests;
5
6
use Firesphere\SolrSearch\Models\QueryRecord;
7
use SilverStripe\Dev\SapphireTest;
8
9
class QueryRecordTest extends SapphireTest
10
{
11
    public function testFindOrCreate()
12
    {
13
        $this->assertEquals(1, QueryRecord::findOrCreate('Test', 10)->ID);
14
        $this->assertEquals(20, QueryRecord::findOrCreate('Test', 20)->Results);
15
    }
16
}
17