Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Documents/ReceiptTest.php
Show First 20 Lines • Show All 182 Lines • ▼ Show 20 Lines | class ReceiptTest extends TestCase | ||||
*/ | */ | ||||
public function testPdfOutput(): void | public function testPdfOutput(): void | ||||
{ | { | ||||
$wallet = $this->getTestData(); | $wallet = $this->getTestData(); | ||||
$receipt = new Receipt($wallet, 2020, 5); | $receipt = new Receipt($wallet, 2020, 5); | ||||
$pdf = $receipt->PdfOutput(); | $pdf = $receipt->PdfOutput(); | ||||
$this->assertStringStartsWith("%PDF-1.", $pdf); | $this->assertStringStartsWith("%PDF-1.", $pdf); | ||||
$this->assertTrue(strlen($pdf) > 5000); | $this->assertTrue(strlen($pdf) > 2000); | ||||
// TODO: Test the content somehow | // TODO: Test the content somehow | ||||
} | } | ||||
/** | /** | ||||
* Prepare data for a test | * Prepare data for a test | ||||
* | * | ||||
* @param string $country User country code | * @param string $country User country code | ||||
▲ Show 20 Lines • Show All 186 Lines • Show Last 20 Lines |