Skip to content

Commit 889b5f4

Browse files
committed
improve tests
1 parent d82d3e0 commit 889b5f4

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

tests/PdfTest.php

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@
1111

1212
class PdfTest extends TestCase
1313
{
14-
/**
15-
* @var string
16-
*/
14+
/** @var string */
1715
protected $testFile;
1816

1917
public function setUp()
2018
{
2119
parent::setUp();
2220

2321
$this->testFile = __DIR__.'/files/test.pdf';
22+
2423
$this->multipageTestFile = __DIR__.'/files/multipage-test.pdf';
2524
}
2625

@@ -59,16 +58,13 @@ public function it_will_correctly_return_the_number_of_pages_in_pdf_file()
5958
/** @test */
6059
public function it_will_accept_a_custom_specified_resolution()
6160
{
62-
$pdf = new Pdf($this->testFile);
63-
64-
$pdf->setResolution(72);
65-
66-
$image = $pdf->getImageData('test.jpg')->getImageResolution();
61+
$image = (new Pdf($this->testFile))
62+
->setResolution(72)
63+
->getImageData('test.jpg')
64+
->getImageResolution();
6765

6866
$this->assertEquals($image['x'], 72);
6967
$this->assertEquals($image['y'], 72);
70-
$this->assertNotEquals($image['x'], 144);
71-
$this->assertNotEquals($image['y'], 144);
7268
}
7369

7470
/** @test */
@@ -103,7 +99,5 @@ public function it_can_accept_a_layer()
10399

104100
$this->assertEquals($image['x'], 72);
105101
$this->assertEquals($image['y'], 72);
106-
$this->assertNotEquals($image['x'], 144);
107-
$this->assertNotEquals($image['y'], 144);
108102
}
109103
}

0 commit comments

Comments
 (0)