Passed
Push — master ( 6c2967...aa6a83 )
by Robbie
01:55
created

CwpSearchPageControllerTest::testIndex()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace CWP\Search\Tests;
4
5
use SilverStripe\Dev\FunctionalTest;
6
7
class CwpSearchPageControllerTest extends FunctionalTest
8
{
9
    protected $usesDatabase = true;
10
11
    public function testIndex()
12
    {
13
        $this->autoFollowRedirection = false;
14
        $result = $this->get('/search');
15
16
        $this->assertSame(302, $result->getStatusCode());
17
        $this->assertContains('SearchForm', $result->getHeader('Location'));
18
    }
19
}
20