CwpSearchPageControllerTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
eloc 6
c 2
b 0
f 0
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testIndex() 0 7 1
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