Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaasuni committed Apr 12, 2024
1 parent 039623c commit e1d32b3
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions test/BarcodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,10 @@ public function testGetSvg(): void
$this->assertNotFalse($svg);
$this->assertEquals('86e0362768e8b1b26032381232c0367f', md5($svg));
$headers = xdebug_get_headers();
$this->assertEquals('Content-Disposition: inline; filename="86e0362768e8b1b26032381232c0367f.svg";', $headers[5]);
$this->assertEquals(
'Content-Disposition: inline; filename="86e0362768e8b1b26032381232c0367f.svg";',
$headers[5]
);

// invalid filename
ob_start();
Expand All @@ -317,7 +320,10 @@ public function testGetSvg(): void
$this->assertNotFalse($svg);
$this->assertEquals('86e0362768e8b1b26032381232c0367f', md5($svg));
$headers = xdebug_get_headers();
$this->assertEquals('Content-Disposition: inline; filename="86e0362768e8b1b26032381232c0367f.svg";', $headers[5]);
$this->assertEquals(
'Content-Disposition: inline; filename="86e0362768e8b1b26032381232c0367f.svg";',
$headers[5]
);

// valid filename
ob_start();
Expand All @@ -326,7 +332,10 @@ public function testGetSvg(): void
$this->assertNotFalse($svg);
$this->assertEquals('86e0362768e8b1b26032381232c0367f', md5($svg));
$headers = xdebug_get_headers();
$this->assertEquals('Content-Disposition: inline; filename="test_SVG_filename-001.svg";', $headers[5]);
$this->assertEquals(
'Content-Disposition: inline; filename="test_SVG_filename-001.svg";',
$headers[5]
);
}

public function testGetPng(): void
Expand All @@ -347,7 +356,10 @@ public function testGetPng(): void
$this->assertNotFalse($png);
$this->assertEquals('PNG', substr($png, 1, 3));
$headers = xdebug_get_headers();
$this->assertEquals('Content-Disposition: inline; filename="474e4eb4cfd145be38fe1657909b21b2.png";', $headers[5]);
$this->assertEquals(
'Content-Disposition: inline; filename="474e4eb4cfd145be38fe1657909b21b2.png";',
$headers[5]
);

// invalid filename
ob_start();
Expand All @@ -356,7 +368,10 @@ public function testGetPng(): void
$this->assertNotFalse($png);
$this->assertEquals('PNG', substr($png, 1, 3));
$headers = xdebug_get_headers();
$this->assertEquals('Content-Disposition: inline; filename="474e4eb4cfd145be38fe1657909b21b2.png";', $headers[5]);
$this->assertEquals(
'Content-Disposition: inline; filename="474e4eb4cfd145be38fe1657909b21b2.png";',
$headers[5]
);

// valid filename
ob_start();
Expand All @@ -365,6 +380,9 @@ public function testGetPng(): void
$this->assertNotFalse($png);
$this->assertEquals('PNG', substr($png, 1, 3));
$headers = xdebug_get_headers();
$this->assertEquals('Content-Disposition: inline; filename="test_PNG_filename-001.png";', $headers[5]);
$this->assertEquals(
'Content-Disposition: inline; filename="test_PNG_filename-001.png";',
$headers[5]
);
}
}

0 comments on commit e1d32b3

Please sign in to comment.