Passed
Push — master ( 3c6756...8b3b37 )
by Michael
20:43 queued 12:59
created

MapperFactoryTest::testMapperBMPByURI()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
	/**
3
    This file is part of WideImage.
4
		
5
    WideImage is free software; you can redistribute it and/or modify
6
    it under the terms of the GNU Lesser General Public License as published by
7
    the Free Software Foundation; either version 2.1 of the License, or
8
    (at your option) any later version.
9
		
10
    WideImage is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
    GNU Lesser General Public License for more details.
14
		
15
    You should have received a copy of the GNU Lesser General Public License
16
    along with WideImage; if not, write to the Free Software
17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
    
19
    * @package Tests
20
  **/
21
22
namespace Test\WideImage;
23
24
use WideImage\MapperFactory;
25
use Test\WideImage_TestCase;
26
27
/**
28
 * @package Tests
29
 */
30
class MapperFactoryTest extends WideImage_TestCase
31
{
32
	public function testMapperPNGByURI()
33
	{
34
		$mapper = MapperFactory::selectMapper('uri.png');
35
		$this->assertInstanceOf("WideImage\\Mapper\\PNG", $mapper);
36
	}
37
	
38
	public function testMapperGIFByURI()
39
	{
40
		$mapper = MapperFactory::selectMapper('uri.gif');
41
		$this->assertInstanceOf("WideImage\\Mapper\\GIF", $mapper);
42
	}
43
	
44
	public function testMapperJPGByURI()
45
	{
46
		$mapper = MapperFactory::selectMapper('uri.jpg');
47
		$this->assertInstanceOf("WideImage\\Mapper\\JPEG", $mapper);
48
	}
49
	
50
	public function testMapperBMPByURI()
51
	{
52
		$mapper = MapperFactory::selectMapper('uri.bmp');
53
		$this->assertInstanceOf("WideImage\\Mapper\\BMP", $mapper);
54
	}
55
}
56