CwpSearchPageControllerTest::testIndex()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 7
rs 10
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