Completed
Push — master ( a9d7d4...6320b4 )
by Guillermo A.
03:10
created

ExceptionFactoryTest::testReflectionException()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 6
c 1
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace GuillermoandraeTest\DynamoDb\Factory;
4
5
use Aws\CommandInterface;
6
use Aws\DynamoDb\Exception\DynamoDbException;
7
use Guillermoandrae\DynamoDb\Exception\Exception;
8
use Guillermoandrae\DynamoDb\Factory\ExceptionFactory;
9
use PHPUnit\Framework\TestCase;
10
11
final class ExceptionFactoryTest extends TestCase
12
{
13
    public function testReflectionException()
14
    {
15
        $command = $this->getMockForAbstractClass(CommandInterface::class);
16
        $dynamoDbException = new DynamoDbException('test', $command);
17
        $exception = ExceptionFactory::factory($dynamoDbException);
18
        $this->assertInstanceOf(Exception::class, $exception);
19
    }
20
}
21