testIsDetectingBadHandler()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Incenteev\ParameterHandler\Tests;
4
5
use Incenteev\ParameterHandler\FileHandlerFactory;
6
7
class FileHandlerFactoryTest extends \PHPUnit_Framework_TestCase
8
{
9
    /**
10
     * @expectedException RuntimeException
11
     * @expectedExceptionMessage Unsupported file type: foobar
12
     */
13
    public function testIsDetectingBadHandler()
14
    {
15
        FileHandlerFactory::createFileHandler('foobar');
16
    }
17
18
    public function testIsCreatingFileHandler()
19
    {
20
        $handler = FileHandlerFactory::createFileHandler('yml');
21
        $this->assertInstanceOf('Incenteev\\ParameterHandler\\FileHandler\\YamlHandler', $handler);
22
    }
23
}
24