summaryrefslogtreecommitdiff
path: root/Postman/Postman-Mail/mailgun/vendor
diff options
context:
space:
mode:
authoryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2018-03-04 22:43:20 +0000
committeryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2018-03-04 22:43:20 +0000
commit4d764b4df29b9031e6e21036c8880703804b7e58 (patch)
tree194e4d3ee68d587caec49a4c4672d4c57c2303a0 /Postman/Postman-Mail/mailgun/vendor
parent437ff5566028c456b39fd96ff988a649edd46063 (diff)
downloadPost-SMTP-4d764b4df29b9031e6e21036c8880703804b7e58.zip
* sendgrid 6
* mail params * email log send to column * hostname insted of ip in emails * remove mailgun test folder ( virustotal issue) * added filters to from_name and from_email filters (local connection) * change hostname extrect loginc
Diffstat (limited to 'Postman/Postman-Mail/mailgun/vendor')
-rw-r--r--Postman/Postman-Mail/mailgun/vendor/clue/stream-filter/tests/FilterTest.php386
-rw-r--r--Postman/Postman-Mail/mailgun/vendor/clue/stream-filter/tests/FunTest.php44
-rw-r--r--Postman/Postman-Mail/mailgun/vendor/clue/stream-filter/tests/FunZlibTest.php79
-rw-r--r--Postman/Postman-Mail/mailgun/vendor/php-http/multipart-stream-builder/appveyor.yml39
4 files changed, 0 insertions, 548 deletions
diff --git a/Postman/Postman-Mail/mailgun/vendor/clue/stream-filter/tests/FilterTest.php b/Postman/Postman-Mail/mailgun/vendor/clue/stream-filter/tests/FilterTest.php
deleted file mode 100644
index 02aa3a4..0000000
--- a/Postman/Postman-Mail/mailgun/vendor/clue/stream-filter/tests/FilterTest.php
+++ /dev/null
@@ -1,386 +0,0 @@
-<?php
-
-use Clue\StreamFilter;
-
-class FilterTest extends PHPUnit_Framework_TestCase
-{
- public function testAppendSimpleCallback()
- {
- $stream = $this->createStream();
-
- StreamFilter\append($stream, function ($chunk) {
- return strtoupper($chunk);
- });
-
- fwrite($stream, 'hello');
- fwrite($stream, 'world');
- rewind($stream);
-
- $this->assertEquals('HELLOWORLD', stream_get_contents($stream));
-
- fclose($stream);
- }
-
- public function testAppendNativePhpFunction()
- {
- $stream = $this->createStream();
-
- StreamFilter\append($stream, 'strtoupper');
-
- fwrite($stream, 'hello');
- fwrite($stream, 'world');
- rewind($stream);
-
- $this->assertEquals('HELLOWORLD', stream_get_contents($stream));
-
- fclose($stream);
- }
-
- public function testAppendChangingChunkSize()
- {
- $stream = $this->createStream();
-
- StreamFilter\append($stream, function ($chunk) {
- return str_replace(array('a','e','i','o','u'), '', $chunk);
- });
-
- fwrite($stream, 'hello');
- fwrite($stream, 'world');
- rewind($stream);
-
- $this->assertEquals('hllwrld', stream_get_contents($stream));
-
- fclose($stream);
- }
-
- public function testAppendReturningEmptyStringWillNotPassThrough()
- {
- $stream = $this->createStream();
-
- StreamFilter\append($stream, function ($chunk) {
- return '';
- });
-
- fwrite($stream, 'hello');
- fwrite($stream, 'world');
- rewind($stream);
-
- $this->assertEquals('', stream_get_contents($stream));
-
- fclose($stream);
- }
-
- public function testAppendEndEventCanBeBufferedOnClose()
- {
- if (PHP_VERSION < 5.4) $this->markTestSkipped('Not supported on legacy PHP');
-
- $stream = $this->createStream();
-
- StreamFilter\append($stream, function ($chunk = null) {
- if ($chunk === null) {
- // this signals the end event
- return '!';
- }
- return $chunk . ' ';
- }, STREAM_FILTER_WRITE);
-
- $buffered = '';
- StreamFilter\append($stream, function ($chunk) use (&$buffered) {
- $buffered .= $chunk;
- return '';
- });
-
- fwrite($stream, 'hello');
- fwrite($stream, 'world');
-
- fclose($stream);
-
- $this->assertEquals('hello world !', $buffered);
- }
-
- public function testAppendEndEventWillBeCalledOnRemove()
- {
- $stream = $this->createStream();
-
- $ended = false;
- $filter = StreamFilter\append($stream, function ($chunk = null) use (&$ended) {
- if ($chunk === null) {
- $ended = true;
- }
- return $chunk;
- }, STREAM_FILTER_WRITE);
-
- $this->assertEquals(0, $ended);
- StreamFilter\remove($filter);
- $this->assertEquals(1, $ended);
- }
-
- public function testAppendEndEventWillBeCalledOnClose()
- {
- $stream = $this->createStream();
-
- $ended = false;
- StreamFilter\append($stream, function ($chunk = null) use (&$ended) {
- if ($chunk === null) {
- $ended = true;
- }
- return $chunk;
- }, STREAM_FILTER_WRITE);
-
- $this->assertEquals(0, $ended);
- fclose($stream);
- $this->assertEquals(1, $ended);
- }
-
- public function testAppendWriteOnly()
- {
- $stream = $this->createStream();
-
- $invoked = 0;
-
- StreamFilter\append($stream, function ($chunk) use (&$invoked) {
- ++$invoked;
-
- return $chunk;
- }, STREAM_FILTER_WRITE);
-
- fwrite($stream, 'a');
- fwrite($stream, 'b');
- fwrite($stream, 'c');
- rewind($stream);
-
- $this->assertEquals(3, $invoked);
- $this->assertEquals('abc', stream_get_contents($stream));
-
- fclose($stream);
- }
-
- public function testAppendReadOnly()
- {
- $stream = $this->createStream();
-
- $invoked = 0;
-
- StreamFilter\append($stream, function ($chunk) use (&$invoked) {
- ++$invoked;
-
- return $chunk;
- }, STREAM_FILTER_READ);
-
- fwrite($stream, 'a');
- fwrite($stream, 'b');
- fwrite($stream, 'c');
- rewind($stream);
-
- $this->assertEquals(0, $invoked);
- $this->assertEquals('abc', stream_get_contents($stream));
- $this->assertEquals(1, $invoked);
-
- fclose($stream);
- }
-
- public function testOrderCallingAppendAfterPrepend()
- {
- $stream = $this->createStream();
-
- StreamFilter\append($stream, function ($chunk) {
- return '[' . $chunk . ']';
- }, STREAM_FILTER_WRITE);
-
- StreamFilter\prepend($stream, function ($chunk) {
- return '(' . $chunk . ')';
- }, STREAM_FILTER_WRITE);
-
- fwrite($stream, 'hello');
- rewind($stream);
-
- $this->assertEquals('[(hello)]', stream_get_contents($stream));
-
- fclose($stream);
- }
-
- public function testRemoveFilter()
- {
- $stream = $this->createStream();
-
- $first = StreamFilter\append($stream, function ($chunk) {
- return $chunk . '?';
- }, STREAM_FILTER_WRITE);
-
- StreamFilter\append($stream, function ($chunk) {
- return $chunk . '!';
- }, STREAM_FILTER_WRITE);
-
- StreamFilter\remove($first);
-
- fwrite($stream, 'hello');
- rewind($stream);
-
- $this->assertEquals('hello!', stream_get_contents($stream));
-
- fclose($stream);
- }
-
- public function testAppendFunDechunk()
- {
- if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (dechunk filter does not exist)');
-
- $stream = $this->createStream();
-
- StreamFilter\append($stream, StreamFilter\fun('dechunk'), STREAM_FILTER_WRITE);
-
- fwrite($stream, "2\r\nhe\r\n");
- fwrite($stream, "3\r\nllo\r\n");
- fwrite($stream, "0\r\n\r\n");
- rewind($stream);
-
- $this->assertEquals('hello', stream_get_contents($stream));
-
- fclose($stream);
- }
-
- public function testAppendThrows()
- {
- $this->createErrorHandler($errors);
-
- $stream = $this->createStream();
- $this->createErrorHandler($errors);
-
- StreamFilter\append($stream, function ($chunk) {
- throw new \DomainException($chunk);
- });
-
- fwrite($stream, 'test');
-
- $this->removeErrorHandler();
- $this->assertCount(1, $errors);
- $this->assertContains('test', $errors[0]);
- }
-
- public function testAppendThrowsDuringEnd()
- {
- $stream = $this->createStream();
- $this->createErrorHandler($errors);
-
- StreamFilter\append($stream, function ($chunk = null) {
- if ($chunk === null) {
- throw new \DomainException('end');
- }
- return $chunk;
- });
-
- fclose($stream);
-
- $this->removeErrorHandler();
-
- // We can only assert we're not seeing an exception here…
- // * php 5.3-5.6 sees one error here
- // * php 7 does not see any error here
- // * hhvm sees the same error twice
- //
- // If you're curious:
- //
- // var_dump($errors);
- // $this->assertCount(1, $errors);
- // $this->assertContains('end', $errors[0]);
- }
-
- public function testAppendThrowsShouldTriggerEnd()
- {
- $stream = $this->createStream();
- $this->createErrorHandler($errors);
-
- $ended = false;
- StreamFilter\append($stream, function ($chunk = null) use (&$ended) {
- if ($chunk === null) {
- $ended = true;
- return '';
- }
- throw new \DomainException($chunk);
- });
-
- $this->assertEquals(false, $ended);
- fwrite($stream, 'test');
- $this->assertEquals(true, $ended);
-
- $this->removeErrorHandler();
- $this->assertCount(1, $errors);
- $this->assertContains('test', $errors[0]);
- }
-
- public function testAppendThrowsShouldTriggerEndButIgnoreExceptionDuringEnd()
- {
- //$this->markTestIncomplete();
- $stream = $this->createStream();
- $this->createErrorHandler($errors);
-
- StreamFilter\append($stream, function ($chunk = null) {
- if ($chunk === null) {
- $chunk = 'end';
- //return '';
- }
- throw new \DomainException($chunk);
- });
-
- fwrite($stream, 'test');
-
- $this->removeErrorHandler();
- $this->assertCount(1, $errors);
- $this->assertContains('test', $errors[0]);
- }
-
- /**
- * @expectedException RuntimeException
- */
- public function testAppendInvalidStreamIsRuntimeError()
- {
- if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (does not reject invalid stream)');
- StreamFilter\append(false, function () { });
- }
-
- /**
- * @expectedException RuntimeException
- */
- public function testPrependInvalidStreamIsRuntimeError()
- {
- if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (does not reject invalid stream)');
- StreamFilter\prepend(false, function () { });
- }
-
- /**
- * @expectedException RuntimeException
- */
- public function testRemoveInvalidFilterIsRuntimeError()
- {
- if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (does not reject invalid filters)');
- StreamFilter\remove(false);
- }
-
- /**
- * @expectedException InvalidArgumentException
- */
- public function testInvalidCallbackIsInvalidArgument()
- {
- $stream = $this->createStream();
-
- StreamFilter\append($stream, 'a-b-c');
- }
-
- private function createStream()
- {
- return fopen('php://memory', 'r+');
- }
-
- private function createErrorHandler(&$errors)
- {
- $errors = array();
- set_error_handler(function ($_, $message) use (&$errors) {
- $errors []= $message;
- });
- }
-
- private function removeErrorHandler()
- {
- restore_error_handler();
- }
-}
diff --git a/Postman/Postman-Mail/mailgun/vendor/clue/stream-filter/tests/FunTest.php b/Postman/Postman-Mail/mailgun/vendor/clue/stream-filter/tests/FunTest.php
deleted file mode 100644
index a52668c..0000000
--- a/Postman/Postman-Mail/mailgun/vendor/clue/stream-filter/tests/FunTest.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-
-use Clue\StreamFilter as Filter;
-
-class FunTest extends PHPUnit_Framework_TestCase
-{
- public function testFunInRot13()
- {
- $rot = Filter\fun('string.rot13');
-
- $this->assertEquals('grfg', $rot('test'));
- $this->assertEquals('test', $rot($rot('test')));
- $this->assertEquals(null, $rot());
- }
-
- public function testFunInQuotedPrintable()
- {
- $encode = Filter\fun('convert.quoted-printable-encode');
- $decode = Filter\fun('convert.quoted-printable-decode');
-
- $this->assertEquals('t=C3=A4st', $encode('täst'));
- $this->assertEquals('täst', $decode($encode('täst')));
- $this->assertEquals(null, $encode());
- }
-
- /**
- * @expectedException RuntimeException
- */
- public function testFunWriteAfterCloseRot13()
- {
- $rot = Filter\fun('string.rot13');
-
- $this->assertEquals(null, $rot());
- $rot('test');
- }
-
- /**
- * @expectedException RuntimeException
- */
- public function testFunInvalid()
- {
- Filter\fun('unknown');
- }
-}
diff --git a/Postman/Postman-Mail/mailgun/vendor/clue/stream-filter/tests/FunZlibTest.php b/Postman/Postman-Mail/mailgun/vendor/clue/stream-filter/tests/FunZlibTest.php
deleted file mode 100644
index 752c8a2..0000000
--- a/Postman/Postman-Mail/mailgun/vendor/clue/stream-filter/tests/FunZlibTest.php
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
-
-use Clue\StreamFilter;
-
-class BuiltInZlibTest extends PHPUnit_Framework_TestCase
-{
- public function testFunZlibDeflateHelloWorld()
- {
- $deflate = StreamFilter\fun('zlib.deflate');
-
- $data = $deflate('hello') . $deflate(' ') . $deflate('world') . $deflate();
-
- $this->assertEquals(gzdeflate('hello world'), $data);
- }
-
- public function testFunZlibDeflateEmpty()
- {
- if (PHP_VERSION >= 7) $this->markTestSkipped('Not supported on PHP7 (empty string does not invoke filter)');
-
- $deflate = StreamFilter\fun('zlib.deflate');
-
- //$data = gzdeflate('');
- $data = $deflate();
-
- $this->assertEquals("\x03\x00", $data);
- }
-
- public function testFunZlibDeflateBig()
- {
- $deflate = StreamFilter\fun('zlib.deflate');
-
- $n = 1000;
- $expected = str_repeat('hello', $n);
-
- $bytes = '';
- for ($i = 0; $i < $n; ++$i) {
- $bytes .= $deflate('hello');
- }
- $bytes .= $deflate();
-
- $this->assertEquals($expected, gzinflate($bytes));
- }
-
- public function testFunZlibInflateHelloWorld()
- {
- $inflate = StreamFilter\fun('zlib.inflate');
-
- $data = $inflate(gzdeflate('hello world')) . $inflate();
-
- $this->assertEquals('hello world', $data);
- }
-
- public function testFunZlibInflateEmpty()
- {
- $inflate = StreamFilter\fun('zlib.inflate');
-
- $data = $inflate("\x03\x00") . $inflate();
-
- $this->assertEquals('', $data);
- }
-
- public function testFunZlibInflateBig()
- {
- if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (final chunk will not be emitted)');
-
- $inflate = StreamFilter\fun('zlib.inflate');
-
- $expected = str_repeat('hello', 10);
- $bytes = gzdeflate($expected);
-
- $ret = '';
- foreach (str_split($bytes, 2) as $chunk) {
- $ret .= $inflate($chunk);
- }
- $ret .= $inflate();
-
- $this->assertEquals($expected, $ret);
- }
-}
diff --git a/Postman/Postman-Mail/mailgun/vendor/php-http/multipart-stream-builder/appveyor.yml b/Postman/Postman-Mail/mailgun/vendor/php-http/multipart-stream-builder/appveyor.yml
deleted file mode 100644
index 8d7af73..0000000
--- a/Postman/Postman-Mail/mailgun/vendor/php-http/multipart-stream-builder/appveyor.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-build: false
-platform:
- - x86
- - x64
-
-clone_folder: c:\projects\php-http\multipart-stream-builder
-
-cache:
- - c:\tools\php -> appveyor.yml
-
-init:
- - SET PATH=c:\php;%PATH%
- - SET COMPOSER_NO_INTERACTION=1
- - SET PHP=1
-
-
-install:
- - IF EXIST c:\php (SET PHP=0) ELSE (mkdir c:\php)
- - cd c:\php
- - IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/releases/archives/php-7.0.0-nts-Win32-VC14-x86.zip
- - IF %PHP%==1 7z x php-7.0.0-nts-Win32-VC14-x86.zip -y >nul
- - IF %PHP%==1 del /Q *.zip
- - IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
- - IF %PHP%==1 copy /Y php.ini-development php.ini
- - IF %PHP%==1 echo max_execution_time=1200 >> php.ini
- - IF %PHP%==1 echo date.timezone="UTC" >> php.ini
- - IF %PHP%==1 echo extension_dir=ext >> php.ini
- - IF %PHP%==1 echo extension=php_openssl.dll >> php.ini
- - IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini
- - IF %PHP%==1 echo extension=php_fileinfo.dll >> php.ini
- - appveyor DownloadFile https://getcomposer.org/composer.phar
- - cd c:\projects\php-http\multipart-stream-builder
- - mkdir %APPDATA%\Composer
- - composer update --prefer-dist --no-progress --ansi
-
-test_script:
- - cd c:\projects\php-http\multipart-stream-builder
- - vendor\bin\phpunit.bat --verbose
-