|
| 1 | +<?php declare(strict_types=1); |
| 2 | + |
| 3 | +namespace PrinsFrank\PdfParser\Tests\Unit\Document\Filter; |
| 4 | + |
| 5 | +use PHPUnit\Framework\Attributes\CoversClass; |
| 6 | +use PHPUnit\Framework\TestCase; |
| 7 | +use PrinsFrank\PdfParser\Document\Filter\Decode\ASCII85Decode; |
| 8 | + |
| 9 | +#[CoversClass(ASCII85Decode::class)] |
| 10 | +class ASCII85DecodeTest extends TestCase { |
| 11 | + public function testDecode(): void { |
| 12 | + static::assertSame( |
| 13 | + 'Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure.', |
| 14 | + ASCII85Decode::decodeBinary( |
| 15 | + <<<'ASCII85' |
| 16 | + 9jqo^BlbD-BleB1DJ+*+F(f,q/0JhKF<GL>Cj@.4Gp$d7F!,L7@<6@)/0JDEF<G%<+EV:2F!,O< |
| 17 | + DJ+*.@<*K0@<6L(Df-\0Ec5e;DffZ(EZee.Bl.9pF"AGXBPCsi+DGm>@3BB/F*&OCAfu2/AKYi( |
| 18 | + DIb:@FD,*)+C]U=@3BN#EcYf8ATD3s@q?d$AftVqCh[NqF<G:8+EV:.+Cf>-FD5W8ARlolDIal( |
| 19 | + DId<j@<?3r@:F%a+D58'ATD4$Bl@l3De:,-DJs`8ARoFb/0JMK@qB4^F!,R<AKZ&-DfTqBG%G>u |
| 20 | + D.RTpAKYo'+CT/5+Cei#DII?(E,9)oF*2M7/c |
| 21 | + ASCII85 |
| 22 | + ) |
| 23 | + ); |
| 24 | + static::assertSame( |
| 25 | + 'Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure.', |
| 26 | + ASCII85Decode::decodeBinary( |
| 27 | + <<<'ASCII85' |
| 28 | + <~9jqo^BlbD-BleB1DJ+*+F(f,q/0JhKF<GL>Cj@.4Gp$d7F!,L7@<6@)/0JDEF<G%<+EV:2F!,O< |
| 29 | + DJ+*.@<*K0@<6L(Df-\0Ec5e;DffZ(EZee.Bl.9pF"AGXBPCsi+DGm>@3BB/F*&OCAfu2/AKYi( |
| 30 | + DIb:@FD,*)+C]U=@3BN#EcYf8ATD3s@q?d$AftVqCh[NqF<G:8+EV:.+Cf>-FD5W8ARlolDIal( |
| 31 | + DId<j@<?3r@:F%a+D58'ATD4$Bl@l3De:,-DJs`8ARoFb/0JMK@qB4^F!,R<AKZ&-DfTqBG%G>u |
| 32 | + D.RTpAKYo'+CT/5+Cei#DII?(E,9)oF*2M7/c~> |
| 33 | + ASCII85 |
| 34 | + ) |
| 35 | + ); |
| 36 | + } |
| 37 | +} |
0 commit comments