Skip to content

Commit

Permalink
Added duplex setting to the unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
Matty Driessen committed Sep 15, 2021
1 parent e0a818e commit 777adfe
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/Driver/Fpdi2DriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public function testMerge()
$source->getName()->willReturn('');
$source->getContents()->willReturn('');
$source->getPages()->willReturn(new Pages('1, 2'));
$source->getDuplex()->willReturn(false);

$this->assertSame(
'created-pdf',
Expand Down
1 change: 1 addition & 0 deletions tests/Driver/TcpdiDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function testMerge()
$source->getName()->willReturn('');
$source->getContents()->willReturn('data');
$source->getPages()->willReturn(new Pages('1, 2'));
$source->getDuplex()->willReturn(false);

$this->assertSame(
'created-pdf',
Expand Down
8 changes: 8 additions & 0 deletions tests/Source/FileSourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,12 @@ public function testGetPages()
(new FileSource(__FILE__, $pages))->getPages()
);
}

public function testGetDuplex()
{
$this->assertSame(
true,
(new FileSource(__FILE__, null, true))->getDuplex()
);
}
}
8 changes: 8 additions & 0 deletions tests/Source/RawSourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,12 @@ public function testGetPages()
(new RawSource('', $pages))->getPages()
);
}

public function testGetDuplex()
{
$this->assertSame(
true,
(new RawSource(__FILE__, null, true))->getDuplex()
);
}
}

0 comments on commit 777adfe

Please sign in to comment.