ÿØÿà JFIF ÿá Exif MM * ÿÛ C
Server IP : 199.250.214.225 / Your IP : 3.144.117.167 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/StreamFilters/ |
Upload File : |
<?php class Swift_StreamFilters_StringReplacementFilterTest extends \PHPUnit\Framework\TestCase { public function testBasicReplacementsAreMade() { $filter = $this->createFilter('foo', 'bar'); $this->assertEquals('XbarYbarZ', $filter->filter('XfooYfooZ')); } public function testShouldBufferReturnsTrueIfPartialMatchAtEndOfBuffer() { $filter = $this->createFilter('foo', 'bar'); $this->assertTrue($filter->shouldBuffer('XfooYf'), '%s: Filter should buffer since "foo" is the needle and the ending '. '"f" could be from "foo"' ); } public function testFilterCanMakeMultipleReplacements() { $filter = $this->createFilter(['a', 'b'], 'foo'); $this->assertEquals('XfooYfooZ', $filter->filter('XaYbZ')); } public function testMultipleReplacementsCanBeDifferent() { $filter = $this->createFilter(['a', 'b'], ['foo', 'zip']); $this->assertEquals('XfooYzipZ', $filter->filter('XaYbZ')); } public function testShouldBufferReturnsFalseIfPartialMatchNotAtEndOfString() { $filter = $this->createFilter("\r\n", "\n"); $this->assertFalse($filter->shouldBuffer("foo\r\nbar"), '%s: Filter should not buffer since x0Dx0A is the needle and is not at EOF' ); } public function testShouldBufferReturnsTrueIfAnyOfMultipleMatchesAtEndOfString() { $filter = $this->createFilter(['foo', 'zip'], 'bar'); $this->assertTrue($filter->shouldBuffer('XfooYzi'), '%s: Filter should buffer since "zip" is a needle and the ending '. '"zi" could be from "zip"' ); } public function testShouldBufferReturnsFalseOnEmptyBuffer() { $filter = $this->createFilter("\r\n", "\n"); $this->assertFalse($filter->shouldBuffer('')); } private function createFilter($search, $replace) { return new Swift_StreamFilters_StringReplacementFilter($search, $replace); } }