testGetMessageWithCustomMessage()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace OAuth\Unit\UserData\Exception;
4
5
use OAuth\UserData\Exception\InvalidExtractorException;
6
7
/**
8
 * Generated by PHPUnit_SkeletonGenerator 1.2.1 on 2014-02-08 at 00:27:44.
9
 */
10
class InvalidExtractorExceptionTest extends \PHPUnit_Framework_TestCase
11
{
12
    /**
13
     * @var InvalidExtractorException
14
     */
15
    protected $exception;
16
17
    /**
18
     * Sets up the fixture, for example, opens a network connection.
19
     * This method is called before a test is executed.
20
     */
21
    protected function setUp()
22
    {
23
        $this->exception = new InvalidExtractorException('someClass');
24
    }
25
26
    /**
27
     * Tears down the fixture, for example, closes a network connection.
28
     * This method is called after a test is executed.
29
     */
30
    protected function tearDown()
31
    {
32
    }
33
34
    public function testGetExtractorClass()
35
    {
36
        $this->assertEquals('someClass', $this->exception->getExtractorClass());
37
    }
38
39
    public function testGetMessageWithCustomMessage()
40
    {
41
        $exception = new InvalidExtractorException('someClass', 'custom message');
42
        $this->assertEquals('custom message', $exception->getMessage());
43
    }
44
}
45