AuthenticationExceptionTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testConstructor() 0 11 1
1
<?php
2
declare(strict_types=1);
3
/**
4
 * Created by PhpStorm.
5
 * User: benedikt
6
 * Date: 10/1/17
7
 * Time: 2:08 PM
8
 */
9
10
namespace Tfboe\FmLib\Tests\Unit\Exceptions;
11
12
13
use Tfboe\FmLib\Exceptions\AuthenticationException;
14
use Tfboe\FmLib\Tests\Helpers\UnitTestCase;
15
16
/**
17
 * Class AuthenticationExceptionTest
18
 * @package Tfboe\FmLib\Tests\Unit\Exceptions
19
 */
20
class AuthenticationExceptionTest extends UnitTestCase
21
{
22
//<editor-fold desc="Public Methods">
23
  /**
24
   * @covers \Tfboe\FmLib\Exceptions\AuthenticationException::__construct
25
   */
26
  public function testConstructor()
27
  {
28
    $prev = new \Exception();
29
    $exc = new AuthenticationException("message", $prev);
30
    self::assertEquals("message", $exc->getMessage());
31
    self::assertEquals($prev, $exc->getPrevious());
32
    $exc2 = new AuthenticationException("message");
33
    self::assertEquals("message", $exc2->getMessage());
34
    $exc3 = new AuthenticationException();
35
    self::assertEquals("", $exc3->getMessage());
36
  }
37
//</editor-fold desc="Public Methods">
38
}