File tree 3 files changed +4
-25
lines changed
3 files changed +4
-25
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -42,11 +42,9 @@ class Reader implements ReaderInterface
42
42
*
43
43
* @param \PHPExif\Adapter\AdapterInterface $adapter
44
44
*/
45
- public function __construct (AdapterInterface $ adapter = null )
45
+ public function __construct (AdapterInterface $ adapter )
46
46
{
47
- if (!is_null ($ adapter )) {
48
- $ this ->adapter = $ adapter ;
49
- }
47
+ $ this ->adapter = $ adapter ;
50
48
}
51
49
52
50
/**
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
11
11
*/
12
12
public function setUp ()
13
13
{
14
- $ this ->reader = new \PHPExif \Reader \Reader ();
14
+ $ adapter = $ this ->getMock ('\PHPExif\Adapter\AdapterInterface ' );
15
+ $ this ->reader = new \PHPExif \Reader \Reader ($ adapter );
15
16
}
16
17
17
18
/**
@@ -44,16 +45,6 @@ public function testGetAdapterFromProperty()
44
45
$ this ->assertSame ($ mock , $ this ->reader ->getAdapter ());
45
46
}
46
47
47
- /**
48
- * @group reader
49
- * @covers \PHPExif\Reader\Reader::getAdapter
50
- * @expectedException \PHPExif\Adapter\NoAdapterException
51
- */
52
- public function testGetAdapterThrowsException ()
53
- {
54
- $ this ->reader ->getAdapter ();
55
- }
56
-
57
48
/**
58
49
* @group reader
59
50
* @covers \PHPExif\Reader\Reader::read
You can’t perform that action at this time.
0 commit comments