Passed
Push — master ( 2b386c...0b73f3 )
by Tim
01:41
created

TestNegotiateTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testNegotiate() 0 14 1
1
<?php
2
3
namespace SimpleSAML\Module\monitor\Test;
4
5
use \SimpleSAML_Configuration as ApplicationConfiguration;
6
use \SimpleSAML\Module\monitor\TestCase as TestCase;
7
use \SimpleSAML\Module\monitor\TestData as TestData;
8
use \SimpleSAML\Module\monitor\State as State;
9
10
/**
11
 * Tests for TestCase\Negotiate
12
 */
13
class TestNegotiateTest extends \PHPUnit_Framework_TestCase
14
{
15
    public function testNegotiate()
16
    {
17
        $_SERVER['SERVER_NAME'] = 'localhost';
18
        $handle = new \KRB5NegotiateAuth('idp.example.org.keytab');
0 ignored issues
show
Bug introduced by
The type KRB5NegotiateAuth was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
19
20
        $confTest = new TestCase\AuthSource\Negotiate(
21
            new TestData([
22
                'handle' => $handle,
23
                'autorization' => 'Negotiate:123',
24
            ])
25
        );
26
        $testResult = $confTest->getTestResult();
27
28
        $this->assertEquals(State::SKIPPED, $testResult->getState());
29
    }
30
}
31