Completed
Push — master ( 954b8b...c3a628 )
by Anton
02:07
created

AuthProviderTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 19
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testProviderNotFound() 0 4 1
A testFailureHybridProvider() 0 5 1
1
<?php
2
/**
3
 * @copyright Bluz PHP Team
4
 * @link https://github.com/bluzphp/skeleton
5
 */
6
7
/**
8
 * @namespace
9
 */
10
namespace Application\Tests\Auth;
11
12
use Application\Auth\AuthProvider;
13
use Application\Tests\ControllerTestCase;
14
15
/**
16
 * Class AuthProviderTest
17
 * @author yuklia <[email protected]>
18
 * @package Application\Tests\Auth
19
 */
20
class AuthProviderTest extends ControllerTestCase
21
{
22
    /**
23
     * @expectedException \Exception
24
     */
25
    public function testProviderNotFound()
26
    {
27
        new AuthProvider('fake_data');
28
    }
29
30
    /**
31
     * @expectedException \Exception
32
     */
33
    public function testFailureHybridProvider()
34
    {
35
        $provider = new AuthProvider('olo');
36
        self::assertInstanceOf('\Hybrid_Provider_Adapter', $provider->authenticate('olo'));
0 ignored issues
show
Bug introduced by
The method authenticate() does not seem to exist on object<Application\Auth\AuthProvider>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
37
    }
38
}
39