konsulting/assert-pdfs
Composer 安装命令:
composer require konsulting/assert-pdfs
包简介
Simple PHP(Unit) Package to help with making assertions on PDFs
README 文档
README
A simple assertion package to work with PDFs and PHPUnit.
Please ensure that you have Imagick install/available and it has permission to write to PDF (see this post on stack overflow). You may need to run something like:
sudo sed -i -e 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml
This is effectively a package up of this starting point from Gordon Lesti.
Installation
composer require --dev konsulting/assert-pdfs
Usage
Use the Konsulting\Testing\AssertPdfs trait on your test class. Available methods:
assertPdfSame($assertedPdf, $testPdf, $saveDiffToFile = null) - You can optionally save the diff of the pdf on
failure to a file by providing a path to save to.
Hopefully we can add some more methods when we need them (or you do).
Contribution
Please feel free to contribute.
统计信息
- 总下载量: 32
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-09-13