Skip to content

Commit

Permalink
add wkhtmltopdf to travis
Browse files Browse the repository at this point in the history
  • Loading branch information
giansalex committed Jan 21, 2018
1 parent c21155b commit e341ab0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
language: php

php:
- 7.0

os:
- linux
sudo: required
dist: trusty

before_script:
- wget https://downloads.wkhtmltopdf.org/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
- tar xf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
- sudo mv wkhtmltox/bin/wkhtmltopdf /usr/local/bin
- composer self-update
- composer install --prefer-source --no-interaction

Expand Down
5 changes: 4 additions & 1 deletion tests/Report/PdfReportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ protected function setUp()
'page-width' => '21cm',
'page-height' => '29.7cm',
]);
$this->pdf->setBinPath(__DIR__.'/../../wkhtmltopdf.exe');

if ($this->isWindows()) {
$this->pdf->setBinPath(__DIR__.'/../../wkhtmltopdf.exe');
}
}

public function testPdfRender()
Expand Down

0 comments on commit e341ab0

Please sign in to comment.